httpx-aiohttp
Aiohttp transport for HTTPX
What it is and what it does
httpx-aiohttp is a bridge that lets you use aiohttp as the underlying transport for httpx HTTP clients. It delegates socket-level HTTP messaging to aiohttp while keeping httpx's convenient high-level API for authentication, retries, cookies, and request/response handling. This is useful when you want aiohttp's specific behavior or integration but prefer httpx's interface and feature set.
The package is actively maintained, recently released, and has low installation friction. It supports both the standard httpx and an optional httpx2 extra. Since it's a thin adapter between two established async HTTP libraries, it's primarily useful in projects that already depend on both or that need aiohttp specifically for compatibility or performance reasons.
Use it for:
- Use it when you need httpx's API but your project is already built around aiohttp and its ecosystem.
- Use it to add httpx's retry and authentication features on top of an existing aiohttp-based async HTTP stack.
- Use it to migrate from pure aiohttp to httpx while keeping aiohttp as the transport layer for compatibility.
- Use it in projects that require aiohttp's specific connection pooling or session management behavior with httpx's higher-level interface.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides aiohttp-based transports for httpx, allowing httpx to use aiohttp for low-level HTTP messaging while keeping httpx's high-level features like authentication, retries, and cookies.
Yes, if you need both httpx and aiohttp in the same project. The package is actively maintained, has no known vulnerabilities, and low install friction. If you're already using httpx without aiohttp, there's no reason to add this dependency unless you specifically need aiohttp's transport behavior.
Install
httpx-aiohttp on PyPI
pip
pip install httpx-aiohttpuv
uv add httpx-aiohttppoetry
poetry add httpx-aiohttpInstalling httpx-aiohttp
Before you install
Low install friction with only two runtime dependencies (aiohttp and httpx). Active maintenance with a recent release 20 days ago and commits through July 2026.
License in practice
Licensed under BSD 3-Clause. License treatment is marked unclear in the metadata, but the raw license text is the standard BSD 3-Clause, which is permissive and suitable for most use cases.
Quickstart
pip install httpx-aiohttp
import httpx
from httpx_aiohttp import AiohttpTransport
async with httpx.AsyncClient(transport=AiohttpTransport()) as client:
response = await client.get('https://example.com')
Requires Python 3.9 or later and an async context (asyncio event loop running).
Verify before relying
- Whether httpx2 extra support is production-ready or experimental
- Performance characteristics compared to httpx's default transports
- Specific aiohttp version compatibility constraints beyond what pip resolves
Package facts
| License | Copyright © 2025, Karen Petrosyan. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:… (full text in the JSON record) (unclear) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, httpx |
| Maintenance | actively maintained — 20 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 5,511,453/month — #2,085 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: httpx_aiohttp-0.2.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
httpx-retriesAdds automatic request retry logic to HTTPX,…
permissive · top 5,000 on PyPI
httpx-socksAdds SOCKS4(a), SOCKS5(h), and HTTP CONNECT…
permissive · top 5,000 on PyPI
httpx2HTTPX2 is a fully featured HTTP client library…
permissive · top 1,000 on PyPI
aiohttp-asgi-connectorProvides an AIOHTTP connector that lets you…
permissive · top 15,000 on PyPI
httpxthrottlecacheWraps HTTPX with built-in rate limiting and…
unclear · top 15,000 on PyPI
opentelemetry-instrumentation-httpxAdds distributed tracing to HTTP requests made…
permissive · top 1,000 on PyPI
mautrixAn asyncio Matrix framework for Python that…
copyleft · top 5,000 on PyPI
pyimouapiAsync Python client for Imou Open Platform…
permissive · top 15,000 on PyPI
aioymapsaioymaps is an async client library for…
permissive · top 15,000 on PyPI