{"id":23280,"library":"asgi-tools","title":"asgi-tools","description":"ASGI Toolkit for building ASGI web applications and middlewares. Version 2.1.1 supports Python 3.10+. Regular releases, active development.","status":"active","version":"2.1.1","language":"python","source_language":"en","source_url":"https://github.com/klen/asgi-tools","tags":["asgi","web-framework","async","middleware"],"install":[{"cmd":"pip install asgi-tools","lang":"bash","label":"pip install"}],"dependencies":[],"imports":[{"note":"App is re-exported from asgi_tools package; importing from submodule may break if internal structure changes.","wrong":"from asgi_tools.app import App","symbol":"App","correct":"from asgi_tools import App"},{"note":"Router is re-exported; submodule paths are not part of public API.","wrong":"from asgi_tools.routes import Router","symbol":"Router","correct":"from asgi_tools import Router"}],"quickstart":{"code":"from asgi_tools import App, Request, Response\n\napp = App()\n\n@app.route('/')\nasync def home(request: Request):\n    return Response.text('Hello, world!')\n\n# Run with: uvicorn module:app\n","lang":"python","description":"Minimal ASGI app with routing."},"warnings":[{"fix":"Use from asgi_tools import App, Router, Request, Response","message":"Import paths changed in 2.0: direct imports from asgi_tools are correct; avoid importing from submodules like asgi_tools.app, asgi_tools.routes, etc.","severity":"gotcha","affected_versions":">=2.0"},{"fix":"Migrate to starlette.responses.FileResponse or implement streaming manually.","message":"asgi_tools.ResponseFile is deprecated in 2.0. Use starlette.responses.FileResponse or custom streaming.","severity":"deprecated","affected_versions":"2.0+"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure asgi-tools>=2.0 is installed and use 'from asgi_tools import App'","cause":"Package not installed or wrong version (pre-2.0 had App in asgi_tools.app submodule).","error":"ImportError: cannot import name 'App' from 'asgi_tools'"},{"fix":"Use app.route() or Router().route() but the typical pattern is App with .route() decorator.","cause":"Using Router without App; Router is only used inside App.","error":"RuntimeError: 'Router' object has no attribute 'route'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}