skillfed

async-asgi-testclient

Async client for testing ASGI web applications

async-asgi-testclient v1.4.11 288.6K downloads/30d#8,017 on PyPI161
Permissive license MIT license Abandoned released

What it is and what it does

async-asgi-testclient is a testing library for ASGI web applications that avoids the complexity of running a separate HTTP server during tests. Instead of spawning the app in a different process or thread, it calls the ASGI application directly within the same asyncio loop. This approach simplifies test writing and debugging by keeping everything in a single execution context.

The library is framework-agnostic, meaning it works with any ASGI-compliant framework without depending on framework-specific testing utilities. It supports cookies, multipart form data, redirects, response and request streams, and WebSocket connections. The package has no runtime dependencies, making it lightweight to add to a test suite.

Use it for:

  • Testing ASGI applications without running a live HTTP server during CI/CD pipelines.
  • Writing async unit tests for ASGI middleware and route handlers with direct app invocation.
  • Testing WebSocket endpoints and streaming responses in async ASGI applications.
  • Debugging ASGI app behavior by keeping test and app code in the same asyncio event loop.
  • Testing multipart form uploads and cookie handling in async web frameworks.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides an async test client for ASGI web applications that calls the app directly without spawning a separate HTTP server, supporting both ASGI 2 and 3 specifications.

No, with caution. While the package is lightweight and permissively licensed, it has been abandoned with no releases since 2022-06-13. The ASGI ecosystem has evolved significantly since then, and there is no evidence of ongoing maintenance or compatibility with modern Python or framework versions. Use only if locked into an older codebase; for new projects, prefer actively maintained testing clients.

Install

async-asgi-testclient on PyPI

pip

pip install async-asgi-testclient

uv

uv add async-asgi-testclient

poetry

poetry add async-asgi-testclient

Installing async-asgi-testclient

Before you install

High install friction reported. Package is in abandoned maintenance status with no releases since 2022-06-13, over 1523 days ago. Last repository commit was 2023-06-29. While classifiers claim production stability, the lack of recent updates means compatibility with current Python or ASGI ecosystem versions is uncertain.

License in practice

MIT license (permissive). You can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install async-asgi-testclient

from async_asgi_testclient import TestClient

async with TestClient(app) as client:
    resp = await client.get("/")
    assert resp.status_code == 200

Requires Python 3.6+; designed for use with async test frameworks.

Verify before relying

  • Whether the package works with current ASGI 3 implementations and modern async frameworks given the maintenance gap.
  • Compatibility with Python versions beyond 3.10 (classifiers only list up to 3.10).
  • Whether websocket, multipart, and stream support remain functional with current ASGI ecosystem changes.

Package facts

License MIT license (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 1,523 days since the last release
Last repo commit
First released
Downloads 288,647/month — #8,017 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: async-asgi-testclient-1.4.11.tar.gz

Keywords: async, asgi, testclient

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

asgi testing clientasync web app testingtest asgi applicationsdirect asgi app testingasync http test clientframework-agnostic asgi testsasgi application testing
asgi-testingasync-testingabandoned

More Testing packages