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(
{
"/users": 1,
"/users/:id": 2,
"/user/repo/*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).
Release files for routrie 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| routrie-0.8.0.tar.gz | 9.7 kB | Details |
Built distributions (wheels)
Total release size: 5.9 MB
Release files / routrie-0.8.0.tar.gz
| Download URL | routrie-0.8.0.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b9f1ae625e5febaab629ff57260889c1ea0ce6535faeab5a5415d4caae8fb8a
|
|
BLAKE2b-256 checksum How to use checksums |
7197f2e19968e3876dd4b8807b0e8e6e847241c146dee8a487f615ffec233356
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | routrie-0.8.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 207.4 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
a2d84be5c36d4a10545ed3a6929882d36e7774f4447c1e94984146b85ec0d5f7
|
|
BLAKE2b-256 checksum How to use checksums |
44b922778e83f89b73786c07c30fed8547268b3726d35b34b6506b288e658d3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | routrie-0.8.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 193.8 kB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
4f0cf84c193681ff594c0e78a0e8270137ac2476391d0a0c3498a5fbcaabcc1f
|
|
BLAKE2b-256 checksum How to use checksums |
bab918cd47dffb91dfeb2ebf53b3e86f3b5bd03e85d5c86fbaa3eac0ad0a3bd6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl
| Download URL | routrie-0.8.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl |
|---|---|
| Size | 188.9 kB |
| Tags | PyPy 3.9 PyPy 3.9 7.3 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
1548c13d776a6d1fc2ef23db68ba4615a83e0ddb57287fb5919fdd5b16189462
|
|
BLAKE2b-256 checksum How to use checksums |
0ad3d04f95206b276c71ce0ba19880058789c6590138b6c44a27e49cbf267420
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | routrie-0.8.0-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 207.1 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
2a8d4ba86aadb55562530d27338cbd2ab30e75347a0677968f83a3ca4fdf1fd0
|
|
BLAKE2b-256 checksum How to use checksums |
2455ad5e8e7d39b5ea853f246c724f9c86f0ac33be2d85e2c7a63e7ea8c15447
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | routrie-0.8.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 193.7 kB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.8 PyPy 3.8 7.3 |
|
SHA-256 checksum How to use checksums |
e367f1674985bd56f93d313028d451be5de432afbaad9fbc1b0e5d249a2a01a8
|
|
BLAKE2b-256 checksum How to use checksums |
7699fb9029af15ff5534e60f01227b6c673b1d67bb01851f8efb157bc75210ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl
| Download URL | routrie-0.8.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl |
|---|---|
| Size | 188.8 kB |
| Tags | PyPy 3.8 PyPy 3.8 7.3 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
8fda9b5f90b437209379ae542072a799a5f8c465e4af10c9aefe34bac8c95529
|
|
BLAKE2b-256 checksum How to use checksums |
a5705954e3bf27a6dddc5fc79ae63070f23e7ec7b7e5704d46bbd01a004d6af6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | routrie-0.8.0-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 209.5 kB |
| Tags | Linux glibc 2.17+ x86-64 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
8593bef060e1f4c18c621bd8cc52e510bcc03d075b9888fc437c3de87db0b463
|
|
BLAKE2b-256 checksum How to use checksums |
52ab7222a8aa0a2d90026cc0910157117c361ebabc8175a96247bb3d779f223a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | routrie-0.8.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 195.8 kB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.7 PyPy 3.7 7.3 |
|
SHA-256 checksum How to use checksums |
cefa3fc36a06d097a0640338c2e678031c9538fe108fab417b4f78c800f90877
|
|
BLAKE2b-256 checksum How to use checksums |
0f26b1bf0987d9a5b67002932a08192cf290d21691cd8c4c0b1fd673848872b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
| Download URL | routrie-0.8.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl |
|---|---|
| Size | 190.7 kB |
| Tags | PyPy 3.7 PyPy 3.7 7.3 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
71daf244038fa9f36381cfa1b1349029b64c74518cdfd865f556a4d0b99a2377
|
|
BLAKE2b-256 checksum How to use checksums |
b35b30768cc5e9b3ea567d185e3b4d2f73bb60ea41aee865efd432960b19e35f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-win_amd64.whl
| Download URL | routrie-0.8.0-cp37-abi3-win_amd64.whl |
|---|---|
| Size | 135.5 kB |
| Tags | CPython 3.7 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0d6e3487854e055503ad0ffa3b3de26478ee1f443b7112c7b5464e21291641d3
|
|
BLAKE2b-256 checksum How to use checksums |
ea01f9c1c533f06c987dc917a224cbf8d3304d0cd56902e59f1f6c0316e3f780
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-win32.whl
| Download URL | routrie-0.8.0-cp37-abi3-win32.whl |
|---|---|
| Size | 131.1 kB |
| Tags | CPython 3.7 Windows x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
357082153b125a4db18af83e41baf7de4fdede2ea591f6fce54a5d34850441f0
|
|
BLAKE2b-256 checksum How to use checksums |
412c1e79e928aad3e545c555da75423ef2f50f3fee169128491ca09da422db1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-musllinux_1_2_x86_64.whl
| Download URL | routrie-0.8.0-cp37-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 377.6 kB |
| Tags | CPython 3.7 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
dddaf253eb66fea9084ea3cbe430fce99ee1aa97ede785ea8321ac7857de8b5f
|
|
BLAKE2b-256 checksum How to use checksums |
f6f48d44e4ad61ece19ee08a0e9084fa17f30df8b12895720b8f1d7d41d30169
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-musllinux_1_2_i686.whl
| Download URL | routrie-0.8.0-cp37-abi3-musllinux_1_2_i686.whl |
|---|---|
| Size | 402.1 kB |
| Tags | CPython 3.7 Linux musl 1.2+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
637a2ac1c27d11f315b613156aeb47155625fff59ccb8eacb6ffabbcc213f01b
|
|
BLAKE2b-256 checksum How to use checksums |
66790eb9af3114d376a5f32b9143c6b8b48a08a7b3c085144dfd0ff7ec492bbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-musllinux_1_2_armv7l.whl
| Download URL | routrie-0.8.0-cp37-abi3-musllinux_1_2_armv7l.whl |
|---|---|
| Size | 458.5 kB |
| Tags | CPython 3.7 Linux musl 1.2+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
260eae7995a846040c1598cfdceba896f1932a47492f981a9622808dbf160d92
|
|
BLAKE2b-256 checksum How to use checksums |
a7916a427c36bc8a90aad0d45799d5dca1e64a6089ebbce9533dae3b0cde38a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-musllinux_1_2_aarch64.whl
| Download URL | routrie-0.8.0-cp37-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 374.4 kB |
| Tags | CPython 3.7 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a79159619007cf068282f3ec864c302aca58e8f4a6ad89538db37124dc11c626
|
|
BLAKE2b-256 checksum How to use checksums |
e934eca0e6ee402773684a7dfd32cd2d521eac42f8b6619d4136c409c98dae19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | routrie-0.8.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 206.4 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
98fa15b4f043b2deb9c5bd0749293fa7a63ff16ee14a640d9659c26002fff22b
|
|
BLAKE2b-256 checksum How to use checksums |
04eeda266a9cbc49271958040a6480bf45055d2c1c10d8feecf17fa7ef42e976
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
| Download URL | routrie-0.8.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl |
|---|---|
| Size | 260.1 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ IBM System/390x abi3 |
|
SHA-256 checksum How to use checksums |
30674142ca01499513207855a6e10a1a124ebfa1f4df073c90d70070b146e9c8
|
|
BLAKE2b-256 checksum How to use checksums |
eeacb3e51b36ecd0d2e82ece65fe8fa3c8a18a273d5742d87d50aab9a109e85f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
| Download URL | routrie-0.8.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl |
|---|---|
| Size | 295.1 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ PowerPC 64-le abi3 |
|
SHA-256 checksum How to use checksums |
6c70adcc612a56b030c38814b165d23d979659c8162fcce4cf3ab2958d9f7ab9
|
|
BLAKE2b-256 checksum How to use checksums |
5b82508d1f86d7a82f36b9b9122495219e460fe6b24026c24ca0e2a601a34a29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
| Download URL | routrie-0.8.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl |
|---|---|
| Size | 303.4 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ PowerPC 64-be abi3 |
|
SHA-256 checksum How to use checksums |
352d53f23b0a60feed9cbda4e5fc1c119622eeb375d89cdd9e8787479a052fb1
|
|
BLAKE2b-256 checksum How to use checksums |
a6734be29700892733823f6bea02a686b9a6ec4b3aea9996af7a76fb52a4019e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
| Download URL | routrie-0.8.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl |
|---|---|
| Size | 195.4 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ ARMv7l abi3 |
|
SHA-256 checksum How to use checksums |
eb9f990a6f6e90f686f363b104ba2a7b4698665c164fbcc08da356f4bc3bc746
|
|
BLAKE2b-256 checksum How to use checksums |
ddcd18a2a0f58e66d0b898b63422664fb7bd2eba787e558619f46ad69b0705b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | routrie-0.8.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 192.8 kB |
| Tags | CPython 3.7 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
91c40e0d6d94d6a9c527c3b36b4526204c540b3693c3c0ddb3fc83490a5106c2
|
|
BLAKE2b-256 checksum How to use checksums |
aad4f6e1f30bb326e433c526ad212f837bf277cb70066e2d913fac27fdff3fbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
| Download URL | routrie-0.8.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl |
|---|---|
| Size | 228.8 kB |
| Tags | CPython 3.7 Linux glibc 2.5+ x86-32 abi3 |
|
SHA-256 checksum How to use checksums |
13c518a3ed9f149db58ff3dc54c8272e923e731cb04a5310a62a51a254acf81d
|
|
BLAKE2b-256 checksum How to use checksums |
2a2ec6bc3870bb391e4e93741ec551ef3fd98cf7d8440a370026bd8542a5a0c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
| Download URL | routrie-0.8.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl |
|---|---|
| Size | 362.3 kB |
| Tags | CPython 3.7 abi3 macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a83ba3f297c73a2bfda25ef8d6611166464797de1ed799804faa4450484c8a56
|
|
BLAKE2b-256 checksum How to use checksums |
2d30867454fa57f539fd2e19c9c4c14de5a5460cbfc072cc23d025db6fb4aff6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / routrie-0.8.0-cp37-abi3-macosx_10_7_x86_64.whl
| Download URL | routrie-0.8.0-cp37-abi3-macosx_10_7_x86_64.whl |
|---|---|
| Size | 188.2 kB |
| Tags | CPython 3.7 abi3 macOS 10.7+ x86-64 |
|
SHA-256 checksum How to use checksums |
03d2bafb93ee461d09a576cc8d036ac926719db73074844f7fc2265a82b25b30
|
|
BLAKE2b-256 checksum How to use checksums |
3e168f03389aa791496b51b1d70a65983c8eab2915f990e01f33863e492594a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|