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.4.tar.gz
(7.1 kB
view hashes)
Built Distribution
Close
Hashes for rsgiadapter-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d6fff9256870a3b7d9f85068707f82972ed9a4616d5135fce67af4b2cf48b39 |
|
MD5 | 35f72932770a5e5ea40ede272a41b89c |
|
BLAKE2b-256 | 0b2a76ef488645dda87ff6885e7a59336173bfe3d6609bcc6edfb962e69a0d87 |