{"id":17030061,"url":"https://github.com/rob-blackbourn/bareasgi","last_synced_at":"2025-04-12T12:11:46.899Z","repository":{"id":44344571,"uuid":"167175224","full_name":"rob-blackbourn/bareASGI","owner":"rob-blackbourn","description":"A lightweight Python ASGI web server framework","archived":false,"fork":false,"pushed_at":"2023-05-15T20:53:52.000Z","size":1989,"stargazers_count":29,"open_issues_count":3,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-21T07:48:18.729Z","etag":null,"topics":["asgi","asyncio","bareasgi","http","http-server","http2","python","sse","web","websocket"],"latest_commit_sha":null,"homepage":"https://rob-blackbourn.github.io/bareASGI/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rob-blackbourn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-23T11:55:01.000Z","updated_at":"2025-01-16T05:05:06.000Z","dependencies_parsed_at":"2022-09-13T09:01:01.482Z","dependency_job_id":null,"html_url":"https://github.com/rob-blackbourn/bareASGI","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-blackbourn%2FbareASGI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-blackbourn%2FbareASGI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-blackbourn%2FbareASGI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rob-blackbourn%2FbareASGI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rob-blackbourn","download_url":"https://codeload.github.com/rob-blackbourn/bareASGI/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565074,"owners_count":21125417,"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","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","asyncio","bareasgi","http","http-server","http2","python","sse","web","websocket"],"created_at":"2024-10-14T08:03:54.701Z","updated_at":"2025-04-12T12:11:46.877Z","avatar_url":"https://github.com/rob-blackbourn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bareASGI\n\nA lightweight Python [ASGI](user-guide/asgi) web server framework\n(read the [docs](https://rob-blackbourn.github.io/bareASGI/)).\n\n## Overview\n\nThis is a _bare_ ASGI web server framework. The goal is to provide\na minimal implementation, with other facilities (serving static files, CORS,\nsessions, etc.) being implemented by optional packages.\n\nThe framework is targeted at micro-services which require a light footprint\n(in a container for example), or as a base for larger frameworks.\n\nPython 3.8+ is required.\n\n## Optional Packages\n\n- [bareASGI-cors](https://github.com/rob-blackbourn/bareASGI-cors) for cross origin resource sharing,\n- [bareASGI-static](https://github.com/rob-blackbourn/bareASGI-static) for serving static files,\n- [bareASGI-jinja2](https://github.com/rob-blackbourn/bareASGI-jinja2) for [Jinja2](https://github.com/pallets/jinja) template rendering,\n- [bareASGI-graphql-next](https://github.com/rob-blackbourn/bareASGI-graphql-next) for [GraphQL](https://github.com/graphql-python/graphql-core) and [graphene](https://github.com/graphql-python/graphene),\n- [bareASGI-rest](https://github.com/rob-blackbourn/bareASGI-rest) for REST support,\n- [bareASGI-prometheus](https://github.com/rob-blackbourn/bareASGI-prometheus) for [prometheus](https://prometheus.io/) metrics,\n- [bareASGI-session](https://github.com/rob-blackbourn/bareASGI-session) for sessions.\n\n## Functionality\n\nThe framework provides the basic functionality required for developing a web\napplication, including:\n\n- Http,\n- WebSockets,\n- Routing,\n- Lifecycle,\n- Middleware\n\n## Simple Server\n\nHere is a simple server with a request handler that returns some text.\n\n```python\nimport uvicorn\nfrom bareasgi import Application, HttpRequest, HttpResponse, text_writer\n\nasync def example_handler(request: HttpRequest) -\u003e HttpResponse:\n    return HttpResponse(\n        200,\n        [(b'content-type', b'text/plain')],\n        text_writer('This is not a test')\n    )\n\napp = Application()\napp.http_router.add({'GET'}, '/', example_handler)\n\nuvicorn.run(app, port=9009)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob-blackbourn%2Fbareasgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frob-blackbourn%2Fbareasgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frob-blackbourn%2Fbareasgi/lists"}