Use `aiohttp` with `httpx` Interface
Project description
Use aiohttp with httpx Interface
httpx has performance issue, especially when working with high concurrency, while aiohttp does not.
However, your production code and tests may already heavily rely on httpx, making it difficult to migrate to
aiohttp.
This repo provides a workaround: take advantage of httpx's custom transport capability to use aiohttp for the actual
requests
pip install httpx-aiohttptransport
This package supports:
- transport limits (max connection)
- auth
- proxy
respx. Runmock_router.set(router.handler)when you set up the respx mock router (see example).
Known limitations:
- http2.
aiohttpdoes not support http2.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 httpx_aiohttptransport-0.2.0.tar.gz.
File metadata
- Download URL: httpx_aiohttptransport-0.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.6 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30db80c15777c5a456bb77d38a7e5c209c86039d09034543c0fd366d2436ccee
|
|
| MD5 |
8112c6f5ff287319a3e957eae024954a
|
|
| BLAKE2b-256 |
fab5d13397d68154769ea828d093f06c6fe5b9d5d0c8b0b85ef4d2e578d05f06
|
File details
Details for the file httpx_aiohttptransport-0.2.0-py3-none-any.whl.
File metadata
- Download URL: httpx_aiohttptransport-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.12.6 Darwin/24.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffcbde1871d337048081c762232a32538c5b2a0ad2aa2dc9672bf8169111d06c
|
|
| MD5 |
4db64bd8ae291f052ca278ed6c379378
|
|
| BLAKE2b-256 |
4bcf8c04bc2b00c366a4060427ff56a517b409ba1edd1f6364563e564a11fb6b
|