Python wrapper for https://github.com/viz-rs/path-tree
Project description
routrie
A Python wrapper for Rust's path-tree
router (path-tree repo, path-tree crate).
This is a blazingly fast HTTP URL router with support for matching path parameters and catch-all URLs.
Usage:
from routrie import Router, Param
# the generic parameter is the value being stored
# normally this will be an endpoint / route instance
router: Router[int] = Router()
router.insert("/users", 1)
router.insert("/users/:id", 2)
router.insert("/users/repos/*any", 3)
matched = router.find("/foo-bar-baz")
assert matched is None
matched = router.find("/users/routrie")
assert matched is not None
value, params = matched
assert value == 2
assert params[0].name == "id"
assert params[0].value == "routrie"
matched = router.find("/users")
assert matched is not None
value, params = matched
assert value == 1
assert params == []
matched = router.find("/users/repos/)
assert matched is not None
value, params = matched
assert value == 3
assert params == []
matched = router.find("/users/repos/something)
assert matched is not None
value, params = matched
assert value == 3
assert params[0].name = "any"
assert params[0].value = "something"
Contributing
- Clone the repo.
- Run
make init
- Run
make test
- Make your changes
- Push and open a pull request
- Wait for CI to run.
If your pull request gets approved and merged, it will automatically be relased to PyPi (every commit to main
is released).
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 Distributions
File details
Details for the file routrie-0.3.0.tar.gz
.
File metadata
- Download URL: routrie-0.3.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e67046487e4750f13de38f84210c44e2261545539223a09f62d0fc2ba554c43 |
|
MD5 | 5480f61ffeafcd406bded31f34c738ee |
|
BLAKE2b-256 | 2ed7f5a434b5513a12a87133ceecc6484f563325fce45cf450e5c9a2d80b5161 |
Provenance
File details
Details for the file routrie-0.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 186.0 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 715b5c07a9ea2f012be41f4ac6f85d6578544ff64a5abbf108b448136cd6a2fc |
|
MD5 | d6197e6cd33662a6387d6097b141d901 |
|
BLAKE2b-256 | 9835f8ca1d60e52eadeec6385a6eec841dfc4e25fe58ffb75ed79695c2d1ca86 |
Provenance
File details
Details for the file routrie-0.3.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 198.6 kB
- Tags: PyPy, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21a726e719b9e74214ff1c485b3d1b00d4f2628a74c6dded7f066ea912a02e0c |
|
MD5 | 5071559d83afeb063ddb11379afed25a |
|
BLAKE2b-256 | 69c0bdb91b5e2574b6d0a58b7d72bfbaaa01cae5ee67d5b11a803ceb6c89f3ac |
Provenance
File details
Details for the file routrie-0.3.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl
- Upload date:
- Size: 182.0 kB
- Tags: PyPy, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8da7785c5d5db86f25bef57734ccec4247c5e0fe8f8b976ec8ec4e33e44be09 |
|
MD5 | f0143b9d9b82e5dc7f97dd56e3df6b7d |
|
BLAKE2b-256 | f7611c7c694b1eef4c1855735378b975301364913425a248cd58404a19377d8f |
Provenance
File details
Details for the file routrie-0.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 185.7 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b4eb5bda6ed0931e56d083ff4006aa56637df019c8d390cec7299257cdc601a |
|
MD5 | 18fba306b1fdd252e82a87aadd311f51 |
|
BLAKE2b-256 | fe35af2ccb5fa5753fa8d904c649e27ba8d75b065fbdef04cce1cb7e2989ea84 |
Provenance
File details
Details for the file routrie-0.3.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 198.4 kB
- Tags: PyPy, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71dc50bacfa1bcdbe30fef4a7a49cdc23613cb5a9953914fcaf9b3f0066a58f5 |
|
MD5 | 7eabc42d31863cdfaaad280660d724f3 |
|
BLAKE2b-256 | b27023763579c896944121351d4ac59bc19ee99ef7f23895421872b447f9a428 |
Provenance
File details
Details for the file routrie-0.3.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl
- Upload date:
- Size: 181.8 kB
- Tags: PyPy, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2d01d7897be1eca6dfcf9fcdb2936e869d7a2443e9f12f4b4dc7401ead0a20ac |
|
MD5 | a48e61dd90615377efb1b13298fba18c |
|
BLAKE2b-256 | b8393a278fe6208ba7886ff8aad3bea3ee2682a2ac541dbb82a02cb52f9aacda |
Provenance
File details
Details for the file routrie-0.3.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 187.8 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a071dec8b6d3028eb3410ce4e578e69832b013206f897f05089ba263ee1da3d |
|
MD5 | d8f2b8e02d4dda9c21feb4f70eb51e06 |
|
BLAKE2b-256 | 995fcdd9fbaf8e5b954b2939c4babe9a3cc220f13e9cde816ed46a19c1917a78 |
Provenance
File details
Details for the file routrie-0.3.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 200.6 kB
- Tags: PyPy, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f4da76e656bc0894a3f8524459c2d67a78866f505bd96d10f559743f6dc57be9 |
|
MD5 | 13c0aad8771418d9cd14080e02a50a94 |
|
BLAKE2b-256 | 43f1fbe8c511a98494c206361e38fd72eab6641157f89d22fa77ff2e3bd19869 |
Provenance
File details
Details for the file routrie-0.3.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
- Upload date:
- Size: 183.5 kB
- Tags: PyPy, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a11b2d3f1cb6e875d2b9028f594a85c0ade4a09ae902c7979e6314cb60b108b3 |
|
MD5 | 9cae27d42444f2c6331945a7b35294ac |
|
BLAKE2b-256 | 00f16124540600fdff831d5e1a7c75600c9c9e8f3f52440fe7104767c8ee23a5 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 128.3 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35c609419c0e9fc24c6a75809d5988c077125053f7df3263a92d3ae27ebbb5fd |
|
MD5 | 705063cf304c32977647a064417b191d |
|
BLAKE2b-256 | 4eda175aee9caece43fb6694a0b8db80c0c6b1d1750654888317c59cbc0d2ffb |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-win32.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-win32.whl
- Upload date:
- Size: 123.3 kB
- Tags: CPython 3.7+, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebd4240637df73c1759c2fb77e32d6ca61f2b412ca084850544a25fd2f5aabbf |
|
MD5 | 873227f37167e70b0b967a23ee6e4bb6 |
|
BLAKE2b-256 | a4c19e324717c8088928b70e639b0ebe9503fb2c00cca2b84dccb2e67ce5d296 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 387.6 kB
- Tags: CPython 3.7+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f9a1722e0a5854e2d6b920f9e8f705110c63e2dddf6210480ceb4704f41b4ee |
|
MD5 | b5963ea338dd7d0c5af7599107ca527f |
|
BLAKE2b-256 | a45d847ab7866058a7c4aa54676955a65f90bba535240efd274ea269810fdfd6 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-musllinux_1_2_i686.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-musllinux_1_2_i686.whl
- Upload date:
- Size: 404.7 kB
- Tags: CPython 3.7+, musllinux: musl 1.2+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 483f95b7c2bb1ff497b0a222444dafd1ef04869253b9f6dc41047395d1dbaae5 |
|
MD5 | 6c081771e7cc743e1442b965866ec844 |
|
BLAKE2b-256 | c048cc5e22214bcf2176d1d92b9bc8cd50781ad919c53eab04a40829d86c36a2 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-musllinux_1_2_armv7l.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-musllinux_1_2_armv7l.whl
- Upload date:
- Size: 527.6 kB
- Tags: CPython 3.7+, musllinux: musl 1.2+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91c97fa25462e8e3d2da4ac9b13fd1c4e8acfd0e67c92467a7b4ae6a755ce4b8 |
|
MD5 | 63634294d7862398c4cf431176938f7c |
|
BLAKE2b-256 | 8bceabbf564f14c62b055b3da8a61da00d840463a048595b5a665866120db656 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-musllinux_1_2_aarch64.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-musllinux_1_2_aarch64.whl
- Upload date:
- Size: 366.4 kB
- Tags: CPython 3.7+, musllinux: musl 1.2+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b14d1726513fccd9a10c14f8e6adf7db8acf3637551ba449640eebfc913955f |
|
MD5 | d59cb45661da53257f129b1792eebba1 |
|
BLAKE2b-256 | 590d5ee7b038d84a7d6cf713a3b74de01b46b82f3962a7fb7bda1ed85d642218 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
- Upload date:
- Size: 245.5 kB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ s390x
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fff9a4a0da2080108b122a3f00958694c712380494906a8f6cfc50a07f37f48c |
|
MD5 | 778d820f32a4f01184bc5d981bde8741 |
|
BLAKE2b-256 | a0fbe8c31e77d2688959c0d0b2c7b8b8eca27741718be7aff56d84f7acb5c8d1 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
- Upload date:
- Size: 285.4 kB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ppc64le
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a54aa2ed6e2c82582101ae7ddc0f9141dbc56fa4cdbecee5d6e66dd67bec43d |
|
MD5 | 04d5e3ad285d3b3340d137d70152e487 |
|
BLAKE2b-256 | a5012daed318d0778cb12df7a26e57a73584ad524cdb37060bba812bd5b0d72d |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
- Upload date:
- Size: 293.2 kB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ppc64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6333e879ce498edc4f48e4189f4dd382379198db49761e26b5adeab1efdd2a30 |
|
MD5 | df41bed014be4238fecdcf2f9cec6c41 |
|
BLAKE2b-256 | baae00f97daa7a70a79dd3cbf69963f5ee7ffe80b1e8907f7d6d8dae8db1679e |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 186.3 kB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5c8f95d4da8540694d6ec386c8ad13ddb009708854d88168c497a8dfe80a99a |
|
MD5 | dcd37a9111f428db7da7530bb78a89c6 |
|
BLAKE2b-256 | b7fcceb953332369d0277f651fc58e57a1ab5fc6e3d37cd00d06dddc96fbf962 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 185.8 kB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0faae3bb8ca13ff9d1453712ac6d388357807d0e2948ce697b535316041c11e3 |
|
MD5 | cd08f0310d4465ffe756a586a0804806 |
|
BLAKE2b-256 | 1831f6ca5bf1410c5cbb94c0161412609668de031fca83a748c7fad53d195016 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 198.3 kB
- Tags: CPython 3.7+, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31e1b4878784b22dd86dbb2c0bba9f0ef9f6f4fe2a22df8411bf107a4c026fe2 |
|
MD5 | a0ca150f65f646a90b634919a8036291 |
|
BLAKE2b-256 | ac67757e51ee7b790fcb7995603d4028c4db51c343cb39334724b52249efce98 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
- Upload date:
- Size: 218.6 kB
- Tags: CPython 3.7+, manylinux: glibc 2.5+ i686
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1cf67c67bfa8ed374797aa10be66e12cf3c1ced08375918928327e379785e32 |
|
MD5 | 4f195d21fad39f7ee0cb293c03b3c12e |
|
BLAKE2b-256 | 6e168b9d8bc8edb6d40326bc0ba9ade5d446c5b3fd2dfabd6131be6b9453b597 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 351.1 kB
- Tags: CPython 3.7+, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09504b61178bb23ca157cd67ffd16253622e4ed6da9abc7e9b185a2d73955400 |
|
MD5 | d82ce26eabbcbaf37350335c4da7592f |
|
BLAKE2b-256 | 04fa7ff08d75bb90a473ad24be27d181b2046a173853c4a568295092818b6746 |
Provenance
File details
Details for the file routrie-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl
.
File metadata
- Download URL: routrie-0.3.0-cp37-abi3-macosx_10_7_x86_64.whl
- Upload date:
- Size: 182.0 kB
- Tags: CPython 3.7+, macOS 10.7+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1f17b6a3171643eebe6571fc6d87fdf5d69969c80b0ecd3c5922608629e7bff |
|
MD5 | 85ca7a96fec55fe9c0a7d594e177bd6a |
|
BLAKE2b-256 | 5c7037904ff728750cfa20edbab9db57a51ad7a5623def47fe7d1775190ac194 |