Skip to main content

yieldfrom.Requests: Requests for asyncio

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

Metadata

Release files for yieldfrom.requests 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yieldfrom.requests 0.1.3
File Size Uploaded
yieldfrom.requests-0.1.3.zip 224.5 kB Details

Release files / yieldfrom.requests-0.1.3.zip

Download URL yieldfrom.requests-0.1.3.zip
Size 224.5 kB
Tags Source
SHA-256 checksum
How to use checksums
efbf01d93a22634a2a138def357ac9659c9bc57bb4cfce8896b02ae825b20b1d
BLAKE2b-256 checksum
How to use checksums
373894cd721a8069f929066119f704391e743823cfd85423147d7cea15b6426f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page