Requests-Core
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.
Metadata
Release files for requests-core 0.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| requests-core-0.0.0.tar.gz | 125.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| requests_core-0.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 275.6 kB
Release files / requests-core-0.0.0.tar.gz
| Download URL | requests-core-0.0.0.tar.gz |
|---|---|
| Size | 125.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f0f3a6acbe7ff9d74c8bb485b6674134753fb216947731a25f3b69910eac55d
|
|
BLAKE2b-256 checksum How to use checksums |
fee79452b81dc495aef0654ad748d987a82b98a93eff2e163d308ece61a1748f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / requests_core-0.0.0-py2.py3-none-any.whl
| Download URL | requests_core-0.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 150.0 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
e37cca806ae491c20e9ef81e717455a6c089449f18613adb4c21fb81bc9532b1
|
|
BLAKE2b-256 checksum How to use checksums |
b945b36edf007eed10bbbdcba59be3100e4a3a8207f519f317055b36f2147fa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |