Is your feature request related to a problem? Please describe.
It'd be nice to be able to iterate over streamed chunks in gpg.decrypt_file instead of having to set an on_data callback.
Describe the solution you'd like
Use one of the functions from https://stackoverflow.com/questions/9968592/turn-functions-with-a-callback-into-python-generators to wrap decrypt_file, yield-ing each chunk of the file as it streams.
Then once the iterator terminates, perhaps a separate method could get the result from the GPG object? Not sure the best way to handle this. Or maybe just raise an exception if there's any failure and ignore the result object otherwise?
Describe alternatives you've considered
Just using on_data and doing this myself. 🙂