All Projects → abersheeran → a2wsgi

abersheeran / a2wsgi

Licence: Apache-2.0 license
Convert WSGI app to ASGI app or ASGI app to WSGI app.

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to a2wsgi

hypercorn-fastapi-docker
Docker image with Hypercorn for FastAPI apps in Python 3.7, 3.8, 3.9. Ready for HTTP2 and HTTPS
Stars: ✭ 18 (-76.92%)
Mutual labels:  wsgi, asgi
spectree
API spec validator and OpenAPI document generator for Python web frameworks.
Stars: ✭ 190 (+143.59%)
Mutual labels:  wsgi, asgi
Aiohttp Wsgi
WSGI adapter for aiohttp.
Stars: ✭ 218 (+179.49%)
Mutual labels:  wsgi
starlite
Light, Flexible and Extensible ASGI API framework
Stars: ✭ 1,525 (+1855.13%)
Mutual labels:  asgi
plaster
Application config settings abstraction layer.
Stars: ✭ 19 (-75.64%)
Mutual labels:  wsgi
flask-redis-docker
A minimal template for dockerized flask app with redis task queue
Stars: ✭ 49 (-37.18%)
Mutual labels:  wsgi
secure-cookie
Secure cookies and sessions for WSGI
Stars: ✭ 30 (-61.54%)
Mutual labels:  wsgi
Clastic
🏔️ A functional web framework that streamlines explicit development practices while eliminating global state.
Stars: ✭ 131 (+67.95%)
Mutual labels:  wsgi
asgi-csrf
ASGI middleware for protecting against CSRF attacks
Stars: ✭ 43 (-44.87%)
Mutual labels:  asgi
fastapi-project
FastAPI application without global variables(almost) =)
Stars: ✭ 26 (-66.67%)
Mutual labels:  asgi
asgi-babel
Adds internationalization (i18n) support to ASGI applications (Asyncio/Trio)
Stars: ✭ 21 (-73.08%)
Mutual labels:  asgi
asgi-caches
Server-side HTTP caching for ASGI applications, inspired by Django's cache framework
Stars: ✭ 18 (-76.92%)
Mutual labels:  asgi
json-head
JSON microservice for performing HEAD requests
Stars: ✭ 31 (-60.26%)
Mutual labels:  asgi
dashboard
An admin interface for ASGI Web frameworks.
Stars: ✭ 120 (+53.85%)
Mutual labels:  asgi
Flask
The Python micro framework for building web applications.
Stars: ✭ 57,408 (+73500%)
Mutual labels:  wsgi
wsgi lineprof
WSGI middleware for line-by-line profiling
Stars: ✭ 47 (-39.74%)
Mutual labels:  wsgi
Pulsar
Event driven concurrent framework for Python
Stars: ✭ 1,867 (+2293.59%)
Mutual labels:  wsgi
mongox
Familiar async Python MongoDB ODM
Stars: ✭ 113 (+44.87%)
Mutual labels:  asgi
async-asgi-testclient
A framework-agnostic library for testing ASGI web applications
Stars: ✭ 123 (+57.69%)
Mutual labels:  asgi
TikTokDownloader PyWebIO
🚀「Douyin_TikTok_Download_API」是一个开箱即用的高性能异步抖音|TikTok数据爬取工具,支持API调用,在线批量解析及下载。
Stars: ✭ 919 (+1078.21%)
Mutual labels:  asgi

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].