An adapter for asgi to rsgi
Project description
rsgiadapter
An Asgi to rsgi adapter.
RSGI Specification ref: https://github.com/emmett-framework/granian/blob/master/docs/spec/RSGI.md
rsgiadapter
is an adapter for RSGI server run ASGI application like FastAPI and BlackSheep.
Usage:
app.py
import granian
from granian.constants import Interfaces
from rsgiadapter import ASGIToRSGI
app = None # Define your asgi application here
rsgi_app = ASGIToRSGI(app)
serve = granian.Granian("app:rsgi_app", interface=Interfaces.RSGI)
serve.serve()
Supported Feature:
- HTTP Request Response
- ASGI scope
- ASGI receive
- ASGI send
- Extensions
- http.response.pathsend
- websocket.http.response
- http.response.push
- http.response.zerocopysend
- http.response.early_hint
- http.response.trailers
- http.response.debug
- Lifespan
- lifespan.startup
- lifespan.startup.complete
- lifespan.startup.failed
- lifespan.shutdown
- lifespan.shutdown.complete
- lifespan.shutdown.failed
Ref:
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
rsgiadapter-0.0.5.tar.gz
(8.9 kB
view hashes)
Built Distribution
Close
Hashes for rsgiadapter-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e4e168b3bd26788e0a8237fe72065518fc75fdafee218a6f97e6573815e3f5a |
|
MD5 | 869474339e38459724e46a5847658065 |
|
BLAKE2b-256 | fc7cc1b96e65df321531582af5df9fc7f43a03f670848d984f7677dc6d0b7e4b |