Created
June 5, 2017 19:24
-
-
Save meejah/6bae3497cf0f71d87060e10e26ae7737 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class _HashSumProtocol(Protocol): | |
def __init__(self, kind='sha256'): | |
self._hash = hashlib.new(kind) | |
def dataReceived(self, data): | |
self.bytes_received += len(data) | |
self._hash.update(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
then you'd do something like this with a
twisted.web.client
Agent: