Experimental lower-level async HTTP client for Requests 3.0
Goals: take urllib3 codebase, add async support (with multiple backends), default to trio execution of async functions for blocking calls.
Usage
Async usage:
import requests_core
url = "http://httpbin.org/uuid"
async def main():
r = await requests_core.request('GET', url)
print(r.headers)
print(await r.read())
>>> import trio
>>> trio.run(main)
HTTPHeaderDict({'connection': 'keep-alive', 'server': 'meinheld/0.6.1', 'date': 'Fri, 16 Mar 2018 11:59:57 GMT', 'content-type': 'application/json', 'access-control-allow-origin': '*', 'access-control-allow-credentials': 'true', 'x-powered-by': 'Flask', 'x-processed-time': '0', 'content-length': '53', 'via': '1.1 vegur'})
b'{\n "uuid": "693947c9-9f49-4b4a-be94-73a152ce1acb"\n}\n'
Sync usage:
>>> r = requests_core.blocking_request('GET', URL)
>>> print()
<requests_core.http_manager._async.response.HTTPResponse object at 0x103f63c88>
Installation
This is a work in progress. Don’t install it.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requestscore-0.0.0.tar.gz
(125.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file requestscore-0.0.0.tar.gz.
File metadata
- Download URL: requestscore-0.0.0.tar.gz
- Upload date:
- Size: 125.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2eb176781ab3382c7ea27c1a3e3d6cace652a6a4987623f822a707d128fa272
|
|
| MD5 |
db19fd21c54ec2f8d4bcf230f55a00d9
|
|
| BLAKE2b-256 |
74667f06c74dce1cc034fc904d0468ff25391b528712b1f0f24c773546c9622e
|
File details
Details for the file requestscore-0.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: requestscore-0.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 150.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f29e52a7a258d4820e39692b936ca4dfdf5a24c017ef454aae22e7cef037f026
|
|
| MD5 |
a3de6475677ccf8b1845ac525f897d8e
|
|
| BLAKE2b-256 |
5173b9abaa51db8dfbf58859116e743f467af94b98acf8d21b12418321e980e9
|