{ "info": { "author": "Simon Willison", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# 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```\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/simonw/asgi-debug", "keywords": "", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "asgi-debug", "package_url": "https://pypi.org/project/asgi-debug/", "platform": "", "project_url": "https://pypi.org/project/asgi-debug/", "project_urls": { "Homepage": "https://github.com/simonw/asgi-debug" }, "release_url": "https://pypi.org/project/asgi-debug/0.1/", "requires_dist": [ "pytest ; extra == 'test'", "pytest-asyncio ; extra == 'test'", "asgiref (==3.1.2) ; extra == 'test'" ], "requires_python": "", "summary": "ASGI middleware for debugging ASGI applications", "version": "0.1" }, "last_serial": 5499006, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "03e91f161ecf0adf20277231062e5643", "sha256": "c59d50ec333c54f986ce436a19b93029355c692d17683d5b5a46ab27dcd87d5d" }, "downloads": -1, "filename": "asgi_debug-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "03e91f161ecf0adf20277231062e5643", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6167, "upload_time": "2019-07-08T05:10:18", "url": "https://files.pythonhosted.org/packages/23/4a/ab2fbfb9e718adf4488433f4f722d77fb8949d7fdfaab93f0d298981fd6d/asgi_debug-0.1-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "03e91f161ecf0adf20277231062e5643", "sha256": "c59d50ec333c54f986ce436a19b93029355c692d17683d5b5a46ab27dcd87d5d" }, "downloads": -1, "filename": "asgi_debug-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "03e91f161ecf0adf20277231062e5643", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6167, "upload_time": "2019-07-08T05:10:18", "url": "https://files.pythonhosted.org/packages/23/4a/ab2fbfb9e718adf4488433f4f722d77fb8949d7fdfaab93f0d298981fd6d/asgi_debug-0.1-py3-none-any.whl" } ] }