A faster URL dispatcher for aiohttp
Project description
aiohttp-fast-url-dispatcher
Documentation: https://aiohttp-fast-url-dispatcher.readthedocs.io
Source Code: https://github.com/bdraco/aiohttp-fast-url-dispatcher
A faster URL dispatcher for aiohttp
The default UrlDispatcher
implementation does a linear search every which can have a significant TimeComplexity when dispatching urls when there are a lot of routes. FastUrlDispatcher
keeps an index of the urls which allows for fast dispatch.
Installation
Install this via pip (or your favourite package manager):
pip install aiohttp-fast-url-dispatcher
Usage
Attach to a web.Application
before any resources are registered.
dispatcher = FastUrlDispatcher()
app = web.Application()
attach_fast_url_dispatcher(app, dispatcher)
Create with a new web.Application
dispatcher = FastUrlDispatcher()
app = web.Application(router=dispatcher)
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!
Credits
This package was created with Copier and the browniebroke/pypackage-template project template.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for aiohttp_fast_url_dispatcher-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e1f9248c3d773233294fe829f5d4b6b67ebbb1ab106839810e308e076e0fe3 |
|
MD5 | 602c0538de935797f2b121e6f557cbf7 |
|
BLAKE2b-256 | 650bb720afd5877f2dd310b3be5649df0184cf6a324b4d7a4ed5df41eb6b16bf |
Hashes for aiohttp_fast_url_dispatcher-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a737b5a3d3459465b0942e9a10858978fe3c842b66db82507a3261df01f7aaed |
|
MD5 | 52aee93716cdb375135197b712f0918c |
|
BLAKE2b-256 | 762a4ab4ba16b2af1f5bcb6a9724b54cf47f3d54b6e192a88406e5b6c4d26d34 |