aiohttprequests
An async requests-like HTTP client built on aiohttp with requests-compatible API.
Installation
pip install aiohttprequests
text
Usage
import aiohttprequests as requests import asyncio
async def main():
Simple GET
response = await requests.get('https://httpbin.org/get') print(response.content) print(response.text) data = await response.json() print(data)
text
Using Session for persistent connection and cookies
async with requests.Session() as session: await session.get('https://httpbin.org/cookies/set/sessioncookie/123456789') r = await session.get('https://httpbin.org/cookies') print(await r.text) asyncio.run(main())
text
Features
- Fully async API, drop-in replacement for
requestswithasync/await. - Supports all standard HTTP methods:
get,post,put,delete, etc. - Session support with cookie persistence.
- Response object mimics
requests.Response. - Supports streaming, file uploads, JSON, timeout, headers, auth, and more.
Notes
- Must call all methods with
awaitinside async functions. - Requires Python 3.7+ and aiohttp installed.
License
MIT License
Metadata
Release files for awaitedreqs 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| awaitedreqs-0.1.1.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awaitedreqs-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.1 kB
Release files / awaitedreqs-0.1.1.tar.gz
| Download URL | awaitedreqs-0.1.1.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9732b4a18deefca1389fd0d044ea80dbb31005348565ff3899a1b6c968339afa
|
|
BLAKE2b-256 checksum How to use checksums |
fceb0f6debd92d83d8b7856abb213e28230fcd87dac24c9dd33615b6c352ff25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|
Release files / awaitedreqs-0.1.1-py3-none-any.whl
| Download URL | awaitedreqs-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
709ac810060cb90d4b36223d44ac9885acba9fb8de5afc57ace95c7191112d29
|
|
BLAKE2b-256 checksum How to use checksums |
bc50dbe67db7022728cb5005f3a4f855ece0089d2ab79ff918cc341a7e4f4b25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.11
|