Skip to main content

Convert WSGI app to ASGI app or ASGI app to WSGI app.

Project description

a2wsgi

Convert WSGI app to ASGI app or ASGI app to WSGI app.

Pure Python. Only depend on the standard library.

Compared with other converters, the advantage is that a2wsgi will not accumulate the requested content or response content in the memory, so you don't have to worry about the memory limit caused by a2wsgi. This problem exists in converters implemented by uvicorn/startlette or hypercorn.

Install

pip install a2wsgi

How to use

Convert WSGI app to ASGI app:

from a2wsgi import WSGIMiddleware

ASGI_APP = WSGIMiddleware(WSGI_APP)

Convert ASGI app to WSGI app:

from a2wsgi import ASGIMiddleware

WSGI_APP = ASGIMiddleware(ASGI_APP)

Benchmark

Run pytest ./benchmark.py -s to compare the performance of a2wsgi and uvicorn.middleware.wsgi.WSGIMiddleware / asgiref.wsgi.WsgiToAsgi.

Why a2wsgi

Convert WSGI app to ASGI app

You can convert an existing WSGI project to an ASGI project to make it easier to migrate from WSGI applications to ASGI applications.

Convert ASGI app to WSGI app

There is a lot of support for WSGI. Converting ASGI to WSGI, you will be able to use many existing services to deploy ASGI applications.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

a2wsgi-1.5.0.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

a2wsgi-1.5.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file a2wsgi-1.5.0.tar.gz.

File metadata

  • Download URL: a2wsgi-1.5.0.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.7.13 Linux/5.15.0-1014-azure

File hashes

Hashes for a2wsgi-1.5.0.tar.gz
Algorithm Hash digest
SHA256 1a5ce24628dedac7bfc60e41f9ccfd15373e23848cca6500ecd7c52ff77e6983
MD5 f3ab51b254b5155dad7822c774b0b596
BLAKE2b-256 17ade117546531723dda7ea53f8298b04061d79342bc1ca29fb3196aa5a9813e

See more details on using hashes here.

File details

Details for the file a2wsgi-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: a2wsgi-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.7.13 Linux/5.15.0-1014-azure

File hashes

Hashes for a2wsgi-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df36cbeebb38b8f2d9cf3719656833aeb0cb4af39852dda6a6b01344bb08b98d
MD5 57ad72e225a30d3607855865ff75f8cb
BLAKE2b-256 afa7ef8d50da3d96b821445f3037b539a292538ba9a4384955bd11a35075f3f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page