a2wsgi
Convert WSGI app to ASGI app or ASGI app to WSGI app.
Decision gist · record as of 2026-08-14
Yes. a2wsgi solves a real problem—bidirectional WSGI/ASGI conversion without memory buffering—with low install friction, active maintenance, no known vulnerabilities, and a permissive license. Install it when you need to bridge WSGI and ASGI applications or migrate between them.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later.
- WSGIMiddleware uses a thread pool (default 10 threads) and queue (default size 10) which may need tuning for high-concurrency workloads.
- Low friction: pure Python with only typing_extensions as a runtime dependency.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most deployment scenarios.
last release 2025-06-18 (422 days) · last repo commit 2026-03-22 · 283 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 12,244,758 downloads/mo, #1,333 on PyPI
Alternatives
Verify before relying
# Convert WSGI app to ASGI
from a2wsgi import WSGIMiddleware
ASGI_APP = WSGIMiddleware(WSGI_APP)
# Or convert ASGI app to WSGI
from a2wsgi import ASGIMiddleware
WSGI_APP = ASGIMiddleware(ASGI_APP)- Performance characteristics compared to uvicorn/startlette/hypercorn converters beyond memory buffering claims
- Thread pool behavior under high concurrency or with workers parameter tuning
- Queue size tuning guidance for different workload profiles
What it is and what it does
a2wsgi is a bidirectional converter between WSGI and ASGI application interfaces. It wraps a WSGI app to run as ASGI (using a thread pool of up to 10 threads by default) or wraps an ASGI app to run as WSGI (with optional timeout for background tasks). The core design avoids accumulating request or response content in memory, streaming data instead—a difference from converters in uvicorn, startlette, or hypercorn that may buffer entire payloads.
The package is pure Python, depends only on typing_extensions at runtime, and requires Python 3.8 or later. It exposes the original WSGI environ or ASGI scope through special keys, allowing applications to access protocol-level details when needed. Typical use is migrating legacy WSGI projects to ASGI frameworks or deploying ASGI apps in WSGI-only hosting environments.
Use it for
- Migrate a Flask or Django WSGI app to run on an ASGI server like Starlette or FastAPI without rewriting the application.
- Deploy a FastAPI or Starlette ASGI app on traditional WSGI-only hosting (e.g., Apache with mod_wsgi).
- Handle large file uploads or streaming responses without memory overhead in WSGI-to-ASGI conversion.
- Bridge WSGI and ASGI middleware in a single application stack for gradual framework migration.
- Access original protocol details (WSGI environ or ASGI scope) from the opposite protocol layer.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
a2wsgi solves a real problem—bidirectional WSGI/ASGI conversion without memory buffering—with low install friction, active maintenance, no known vulnerabilities, and a permissive license. Install it when you need to bridge WSGI and ASGI applications or migrate between them.
Install
a2wsgi on PyPI
Before you install
Low friction: pure Python with only typing_extensions as a runtime dependency. Active maintenance with recent releases; last commit 2026-03-22 and latest release 2025-06-18.
Requires Python 3.8 or later. WSGIMiddleware uses a thread pool (default 10 threads) and queue (default size 10) which may need tuning for high-concurrency workloads.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most deployment scenarios.
Quickstart
# Convert WSGI app to ASGI
from a2wsgi import WSGIMiddleware
ASGI_APP = WSGIMiddleware(WSGI_APP)
# Or convert ASGI app to WSGI
from a2wsgi import ASGIMiddleware
WSGI_APP = ASGIMiddleware(ASGI_APP)
Verify before relying
- Performance characteristics compared to uvicorn/startlette/hypercorn converters beyond memory buffering claims
- Thread pool behavior under high concurrency or with workers parameter tuning
- Queue size tuning guidance for different workload profiles
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.8.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping_extensions |
| Maintenance | Actively maintained 422 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 12,244,758 / month, #1,333 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3 |
Evidence: a2wsgi-1.10.10-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “wsgi to asgi converter”
- a2wsgiConverts between WSGI and ASGI applications bidirectionally without…
- opentelemetry-util-httpProvides ASGI and WSGI middleware and HTTP utilities for…
- multipartParses multipart/form-data submissions with both incremental…
Give your agent the search over MCP, or paste the wish link into any chat.
More WWW/HTTP packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.
Install it if you are building new projects or modernizing existing ones that rely on HTTP.
A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.
aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.
Install it if you need async HTTP client or server capabilities in asyncio-based applications.
See also asgiref · uvicorn · zappa · brotli-asgi · async-asgi-testclient · gunicorn · apig-wsgi · servestatic · aiohttp-wsgi · multipart