{"id":20397771,"url":"https://github.com/belingud/rsgiadapter","last_synced_at":"2026-02-09T19:36:03.378Z","repository":{"id":243499885,"uuid":"812605384","full_name":"belingud/rsgiadapter","owner":"belingud","description":"An ASGI to RSGI adapter for Python","archived":false,"fork":false,"pushed_at":"2024-08-31T08:52:31.000Z","size":173,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-23T12:22:38.822Z","etag":null,"topics":["asgi","asgiadapter","asyncio","granian","rsgi","rsgiadapter","rsgiref"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/belingud.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-06-09T11:19:17.000Z","updated_at":"2025-07-13T05:53:42.000Z","dependencies_parsed_at":"2024-08-19T19:02:37.578Z","dependency_job_id":"7b7500c9-33de-4a5b-956c-c43f87482f09","html_url":"https://github.com/belingud/rsgiadapter","commit_stats":null,"previous_names":["belingud/rsgiadapter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/belingud/rsgiadapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Frsgiadapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Frsgiadapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Frsgiadapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Frsgiadapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/belingud","download_url":"https://codeload.github.com/belingud/rsgiadapter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/belingud%2Frsgiadapter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267149549,"owners_count":24043439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asgi","asgiadapter","asyncio","granian","rsgi","rsgiadapter","rsgiref"],"created_at":"2024-11-15T04:16:41.046Z","updated_at":"2026-02-09T19:36:03.345Z","avatar_url":"https://github.com/belingud.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rsgiadapter\n\n[![PyPI - Version](https://img.shields.io/pypi/v/rsgiadapter?style=for-the-badge)](https://pypi.org/project/rsgiadapter/) ![GitHub License](https://img.shields.io/github/license/belingud/rsgiadapter?style=for-the-badge) ![PyPI - Downloads](https://img.shields.io/pypi/dm/rsgiadapter?logo=pypi\u0026cacheSeconds=86400\u0026style=for-the-badge) ![PyPI - Status](https://img.shields.io/pypi/status/rsgiadapter?style=for-the-badge)\n![Pepy Total Downlods](https://img.shields.io/pepy/dt/rsgiadapter?style=for-the-badge\u0026logo=python)\n\nAn Asgi to rsgi adapter.\n\nRSGI Specification ref: https://github.com/emmett-framework/granian/blob/master/docs/spec/RSGI.md\n\n`rsgiadapter` is an adapter for [RSGI](https://github.com/emmett-framework/granian/blob/master/docs/spec/RSGI.md) server run [ASGI](https://asgi.readthedocs.io) application like FastAPI and BlackSheep.\n\nThis project provides a way to run ASGI web frameworks on an RSGI server, but it is not recommended to use the RSGI server in this manner. Using frameworks that natively support the RSGI protocol can better leverage the performance advantages of RSGI.\n\nCheck [examples](https://github.com/belingud/rsgiadapter/tree/master/examples) for more framework examples.\nYou can run the scripts in the examples directory to test.\n\nBasic Usage:\n\n`app.py`\n```python\nimport granian\nfrom granian.constants import Interfaces\nfrom rsgiadapter import ASGIToRSGI\n\n\n# Declare your asgi application here\nasync def app(scope, receive, send):\n    await send({\"type\": \"http.response.start\", \"status\": 200, \"headers\": []})\n    await send(\n        {\"type\": \"http.response.body\", \"body\": b\"Hello, World!\", \"more_body\": False}\n    )\n\n\nrsgi_app = ASGIToRSGI(app)\n\nif __name__ == \"__main__\":\n    serve = granian.Granian(\"app:rsgi_app\", interface=Interfaces.RSGI)\n    serve.serve()\n```\n\nwith asgi lifespan:\n\n```python\nfrom contextlib import asynccontextmanager\n\nimport granian\nfrom granian.constants import Interfaces\nfrom rsgiadapter import ASGIToRSGI\n\n\n@asynccontextmanager\nasync def lifespan(_app):\n    print(\"lifespan start\")\n    yield\n    print(\"lifespan stop\")\n\n\n# Declare your asgi application here\nasync def app(scope, receive, send):\n    await send({\"type\": \"http.response.start\", \"status\": 200, \"headers\": []})\n    await send(\n        {\"type\": \"http.response.body\", \"body\": b\"Hello, World!\", \"more_body\": False}\n    )\n\n\nrsgi_app = ASGIToRSGI(app, lifespan=lifespan)\n\nif __name__ == \"__main__\":\n    serve = granian.Granian(\"app:rsgi_app\", interface=Interfaces.RSGI)\n    serve.serve()\n```\n\nSupported Framework:\n\n1. FastAPI\n2. Starlette\n3. litestar\n4. falcon\n5. blacksheep\n6. quart\n7. sanic\n8. Django\u003e=3.0\n9. and other Python web frameworks that support the ASGI protocol, with or without lifespan support.\n\nSupported Feature:\n\n- [x] HTTP Request Response\n  - [x] ASGI scope\n  - [x] ASGI receive\n  - [x] ASGI send\n- [x] Extensions\n  - [x] http.response.pathsend\n  - [ ] websocket.http.response\n  - [ ] http.response.push\n  - [ ] http.response.zerocopysend\n  - [ ] http.response.early_hint\n  - [ ] http.response.trailers\n  - [ ] http.response.debug\n- [x] Lifespan\n  - [x] lifespan.startup\n  - [x] lifespan.startup.complete(silence)\n  - [x] lifespan.startup.failed(will terminate)\n  - [x] lifespan.shutdown\n  - [x] lifespan.shutdown.complete(silence)\n  - [x] lifespan.shutdown.failed(will terminate)\n\nRef:\n\n- Granian: https://github.com/emmett-framework/granian\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelingud%2Frsgiadapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbelingud%2Frsgiadapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbelingud%2Frsgiadapter/lists"}