{"id":23210,"library":"aiohttp-fast-url-dispatcher","title":"aiohttp-fast-url-dispatcher","description":"A faster URL dispatcher for aiohttp web applications. Current version 0.3.1, released July 2024. Replaces aiohttp's built-in URL dispatch with a high-performance alternative. Low release cadence.","status":"active","version":"0.3.1","language":"python","source_language":"en","source_url":"https://github.com/bdraco/aiohttp-fast-url-dispatcher","tags":["aiohttp","url-dispatcher","performance"],"install":[{"cmd":"pip install aiohttp-fast-url-dispatcher","lang":"bash","label":"latest"}],"dependencies":[],"imports":[{"note":"Use the correct import from the package.","wrong":null,"symbol":"FastUrlDispatcher","correct":"from aiohttp_fast_url_dispatcher import FastUrlDispatcher"}],"quickstart":{"code":"from aiohttp import web\nfrom aiohttp_fast_url_dispatcher import FastUrlDispatcher\n\napp = web.Application()\ndispatcher = FastUrlDispatcher()\n\nasync def handler(request):\n    return web.Response(text=\"Hello, world!\")\n\ndispatcher.add_get(\"/\", handler)\napp.router.set_dispatcher(dispatcher)\n\nif __name__ == \"__main__\":\n    web.run_app(app)","lang":"python","description":"Create an aiohttp app and replace the default router dispatcher with FastUrlDispatcher."},"warnings":[{"fix":"Upgrade to v0.3.0+","message":"The library requires Python <3.10 and <4.0; support for newer Python versions is limited. v0.3.0 added support for newer Python but check compatibility.","severity":"deprecated","affected_versions":"<0.3.0"},{"fix":"Ensure your app only uses basic route patterns (plain paths, variable parts). Avoid advanced aiohttp routing features.","message":"FastUrlDispatcher does not support all aiohttp routing features (e.g., nested routers, middlewares on routes). Only use for simple route tables.","severity":"gotcha","affected_versions":"all"},{"fix":"Call app.router.set_dispatcher(dispatcher) before adding routes, or use dispatcher.add_* methods.","message":"The dispatcher must be set before adding routes; otherwise default dispatcher is used.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install aiohttp-fast-url-dispatcher and use 'from aiohttp_fast_url_dispatcher import FastUrlDispatcher'","cause":"Trying to import from aiohttp instead of the separate package.","error":"ImportError: cannot import name 'FastUrlDispatcher' from 'aiohttp'"},{"fix":"Ensure you create the app with 'web.Application()' and then call 'app.router.set_dispatcher(dispatcher)'","cause":"Trying to set dispatcher before initializing the aiohttp app correctly.","error":"AttributeError: 'Application' object has no attribute 'router'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}