Skip to main content

codecov PyPI version PyPI - Python Version PyPI - Downloads PyPI - License Code style: black

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. Run mock_router.set(router.handler) when you set up the respx mock router (see example).

Known limitations:

  • http2. aiohttp does not support http2.

Metadata

Release files for httpx-aiohttptransport 0.2.1

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

Source distribution (sdist)

Source distribution for httpx-aiohttptransport 0.2.1
File Size Uploaded Provenance Actions
httpx_aiohttptransport-0.2.1.tar.gz 4.9 kB Without provenance Details for httpx_aiohttptransport-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for httpx-aiohttptransport 0.2.1
File Interpreter ABI Platform Actions
httpx_aiohttptransport-0.2.1-py3-none-any.whl Python 3 none any Details for httpx_aiohttptransport-0.2.1-py3-none-any.whl

Total release size: 10.0 kB

Release files / httpx_aiohttptransport-0.2.1.tar.gz

Download URL httpx_aiohttptransport-0.2.1.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
62a874b53d53806a0f260549dc20e91b1acd4b586cb8c87723fe762f851979bb
BLAKE2b-256 checksum
How to use checksums
7d753093708d45dafaa609b64596866e7e92720a717604e28aa6494dd87545a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.6 Darwin/24.1.0

Release files / httpx_aiohttptransport-0.2.1-py3-none-any.whl

Download URL httpx_aiohttptransport-0.2.1-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20f2a55eb3d2b9792e162d65b43af431247293033906b84cc1e2dbc3f40935f0
BLAKE2b-256 checksum
How to use checksums
9a3416a6c464ebda1b498087c581a51ae6f644cfa26d3d3e248f73cb9cfe1686
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.1 CPython/3.12.6 Darwin/24.1.0

Security for httpx-aiohttptransport 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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