Skip to content

Async requests #4

@dmpayton

Description

@dmpayton

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.

  1. AsyncIORequestor (asyncio)
    https://stackoverflow.com/questions/22190403/how-could-i-use-requests-in-asyncio
  2. FuturesRequestor (concurrent.futures)
    https://pypi.python.org/pypi/requests-futures
  3. GeventRequestor (gevent)
    https://pypi.python.org/pypi/grequests
  4. TornadoRequestor (Tornado)
    https://pypi.python.org/pypi/trequests
  5. TwistedRequestor (Twisted)
    https://pypi.python.org/pypi/txrequests

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions