Skip to main content

asyncio port of Requests: "Python HTTP for Humans".

Project description

Requests is an Apache2 Licensed HTTP library, written in Python, for human beings.

yieldfrom.Requests is the same library, ported to run under Python’s asyncio.

Where in regular Requests you would write:

>>> r = requests.get('https://api.github.com', auth=('user', 'pass'))
>>> r.status_code
204
>>> r.headers['content-type']
'application/json'
>>> r.text
...

in yieldfrom.Requests you write:

>>> r = yield from requests.get('https://api.github.com', auth=('user', 'pass'))
>>> r.status_code
204
>>> r.headers['content-type']
'application/json'
>>> yield from r.text
...

The get method and the text property involve I/O latency, hence are called as coroutines. The headers and status_code attributes are still plain attributes.

The feature set is the same as the original, though a few methods work slightly differently.

The .stream() method does not stream, but preloads all data, and simulates a stream, so existing dependencies can work with minimal conversion.

Release History

0.1.1 (2014-10-1)

Ported to Asyncio

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
yieldfrom.requests-0.1.3.zip (224.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page