{"id":15433049,"url":"https://github.com/simonw/asgi-debug","last_synced_at":"2025-04-19T17:52:37.183Z","repository":{"id":57411791,"uuid":"195738647","full_name":"simonw/asgi-debug","owner":"simonw","description":"Debugging middleware for ASGI applications","archived":false,"fork":false,"pushed_at":"2019-07-10T18:22:20.000Z","size":7,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-18T07:53:57.321Z","etag":null,"topics":["asgi","middleware"],"latest_commit_sha":null,"homepage":null,"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/simonw.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}},"created_at":"2019-07-08T04:51:59.000Z","updated_at":"2020-03-21T04:47:08.000Z","dependencies_parsed_at":"2022-08-27T19:20:37.499Z","dependency_job_id":null,"html_url":"https://github.com/simonw/asgi-debug","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fasgi-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fasgi-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fasgi-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonw%2Fasgi-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonw","download_url":"https://codeload.github.com/simonw/asgi-debug/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249753094,"owners_count":21320664,"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","middleware"],"created_at":"2024-10-01T18:30:55.303Z","updated_at":"2025-04-19T17:52:37.149Z","avatar_url":"https://github.com/simonw.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asgi-debug\n\n[![PyPI](https://img.shields.io/pypi/v/asgi-debug.svg)](https://pypi.org/project/asgi-debug/)\n[![CircleCI](https://circleci.com/gh/simonw/asgi-debug.svg?style=svg)](https://circleci.com/gh/simonw/asgi-debug)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/simonw/asgi-debug/blob/master/LICENSE)\n\nASGI middleware for debugging ASGI applications\n\n## Installation\n\n    pip install asgi-debug\n\n## Usage\n\nWrap your application in the middleware like this:\n\n```python\nfrom asgi_debug import asgi_debug_decorator\n\n\n@asgi_debug_decorator()\nasync def hello_world_app(scope, receive, send):\n    assert scope[\"type\"] == \"http\"\n    await send(\n        {\n            \"type\": \"http.response.start\",\n            \"status\": 200,\n            \"headers\": [[b\"content-type\", b\"application/json\"]],\n        }\n    )\n    await send({\"type\": \"http.response.body\", \"body\": b'{\"hello\": \"world\"}'})\n```\n\nWhen you run the app, debugging information will print to your terminal.\n\nIf you save the above in `demo.py` you can `pip install uvicorn` and run it like this:\n\n```\nuvicorn demo:hello_world_app\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fasgi-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonw%2Fasgi-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonw%2Fasgi-debug/lists"}