--- id: aiohttp-asgi-connector version: "1.1.2" license: BSD-3-Clause license_treatment: permissive maintenance: aging --- # aiohttp-asgi-connector — AIOHTTP Connector for running ASGI applications License: permissive · Maintenance: aging · Downloads: 120.8K/mo ## What it is and what it does aiohttp-asgi-connector is a custom connector for AIOHTTP's ClientSession that routes HTTP requests directly into ASGI applications without requiring a running web server. It's designed to close the gap between AIOHTTP and HTTPX's testing capabilities, letting you test ASGI apps by making async HTTP calls that bypass the network stack entirely. The connector replaces AIOHTTP's entire connection and transport layer. You instantiate it with your ASGI app, pass it to ClientSession, and then use the session normally—requests are serialized by AIOHTTP and fed directly to the app. Exceptions raised in the app propagate back to your test code. The main limitation is that if you enable chunking or compression on the ClientSession, your ASGI app must handle decompression itself, since the connector transmits requests exactly as AIOHTTP serializes them. Use it for: - Unit testing ASGI endpoints without spinning up a test server. - Integration testing ASGI applications in test suites where you want to avoid network overhead. - Verifying request/response handling in ASGI middleware without HTTP transport. - Debugging ASGI app behavior by inspecting requests and responses in-process during tests. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides an AIOHTTP connector that lets you test ASGI applications by routing ClientSession requests directly to them without a web server. Yes, if you're already using AIOHTTP and testing ASGI applications. It's a low-friction, permissive-licensed tool that solves a specific problem well. The aging maintenance status (418 days since last release) is a minor concern for a stable, narrow-scope library, but monitor the repository for responsiveness if you encounter issues. ## Install pip install aiohttp-asgi-connector uv add aiohttp-asgi-connector poetry add aiohttp-asgi-connector ## Installing aiohttp-asgi-connector Before you install: Low friction: pure Python wheel, single runtime dependency on aiohttp. Maintenance status is aging—last release was 418 days ago—so expect slower response to issues, though the package remains functional for its narrow use case. License in practice: BSD 3-Clause is permissive; you can use this in commercial and proprietary projects with minimal restriction, provided you retain the license notice. Quickstart: from aiohttp_asgi_connector import ASGIApplicationConnector from aiohttp import ClientSession connector = ASGIApplicationConnector(app) async with ClientSession(connector=connector) as session: resp = await session.get("/") data = await resp.json() Requires Python 3.8+; aiohttp 3.1+ must be installed. ASGI lifespan events are not handled—use asgi-lifespan if you need them. Verify before relying: - Whether chunked uploads or compression on the ClientSession are transparently handled or require manual decompression in the ASGI app. - Current maintenance responsiveness given the 418-day gap since last release. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 120.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags aiohttp asgi connector, test asgi apps with aiohttp, aiohttp direct asgi testing, asgi application connector, aiohttp clientsession asgi, asgi testing without server, aiohttp connector testing, asgi-testing, aiohttp-connector [View on SkillFed](https://skillfed.io/packages/aiohttp-asgi-connector) · [View on PyPI](https://pypi.org/project/aiohttp-asgi-connector/)