Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
class _HashSumProtocol(Protocol):
def __init__(self, kind='sha256'):
self._hash =
def dataReceived(self, data):
self.bytes_received += len(data)

This comment has been minimized.

Copy link
Owner Author

@meejah meejah commented Jun 5, 2017

then you'd do something like this with a twisted.web.client Agent:

        resp = yield agent.request('GET', uri)
        hasher = _HashSumProtocol()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.