I'm coming around to the idea that async is the future of Python, and I'd like to support this in python-montage.
The APIRequestor class encapsulates the actual HTTP requests, so it should be possible to implement async functionality in custom requestors. These requestors should live in a montage.async submodule, and Client.__init__ should be updated to accept a custom requestor. There are a number of efforts to make the requests library async, so much of the hard work has been done for us.
AsyncIORequestor (asyncio)
https://stackoverflow.com/questions/22190403/how-could-i-use-requests-in-asyncio
FuturesRequestor (concurrent.futures)
https://pypi.python.org/pypi/requests-futures
GeventRequestor (gevent)
https://pypi.python.org/pypi/grequests
TornadoRequestor (Tornado)
https://pypi.python.org/pypi/trequests
TwistedRequestor (Twisted)
https://pypi.python.org/pypi/txrequests
I'm coming around to the idea that async is the future of Python, and I'd like to support this in python-montage.
The
APIRequestorclass encapsulates the actual HTTP requests, so it should be possible to implement async functionality in custom requestors. These requestors should live in amontage.asyncsubmodule, andClient.__init__should be updated to accept a custom requestor. There are a number of efforts to make therequestslibrary async, so much of the hard work has been done for us.AsyncIORequestor(asyncio)https://stackoverflow.com/questions/22190403/how-could-i-use-requests-in-asyncio
FuturesRequestor(concurrent.futures)https://pypi.python.org/pypi/requests-futures
GeventRequestor(gevent)https://pypi.python.org/pypi/grequests
TornadoRequestor(Tornado)https://pypi.python.org/pypi/trequests
TwistedRequestor(Twisted)https://pypi.python.org/pypi/txrequests