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.3.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for rsgiadapter-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 902632b3d2d2f48555d08702f118827a302ee299aa5c3df21b19ef9077583246 |
|
MD5 | 882bff7dbaac198865c5b1e48c444ca4 |
|
BLAKE2b-256 | 759352611ca0ee3e882ed713f59c7546e4fbc710f2519e9276a2ccaa72f3caa6 |