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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f688a0483954842b133f2ec0466038e47c42fef2fb88ac7aa76ed2f91445c8b |
|
MD5 | 30745c6cedb41efd5e28e561a23e0384 |
|
BLAKE2b-256 | e665744f9685014d4903a5229df331a7aa0a64b1bea1a2253e8792d440f8c3ad |
Hashes for aiohttp_fast_url_dispatcher-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cfc8960238914e9e473ebbaad30a0fb15531cccff1c2cdd0da95fcb0f08055c4 |
|
MD5 | 91db80ebecb1affb29550640a7113b12 |
|
BLAKE2b-256 | 68165d89375badd46b0edea490dbcf0482498e4bf5d2cfdbedb2ddec25056236 |