Skip to main content

Python wrapper for https://github.com/viz-rs/path-tree

Project description

routrie

CI

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

  1. Clone the repo.
  2. Run make init
  3. Run make test
  4. Make your changes
  5. Push and open a pull request
  6. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

routrie-0.4.0.tar.gz (8.6 kB view details)

Uploaded Source

Built Distributions

routrie-0.4.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (186.2 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

routrie-0.4.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (198.8 kB view details)

Uploaded PyPy manylinux: glibc 2.5+ x86-64

routrie-0.4.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl (182.2 kB view details)

Uploaded PyPy macOS 10.7+ x86-64

routrie-0.4.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (185.9 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

routrie-0.4.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (198.6 kB view details)

Uploaded PyPy manylinux: glibc 2.5+ x86-64

routrie-0.4.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl (182.0 kB view details)

Uploaded PyPy macOS 10.7+ x86-64

routrie-0.4.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (188.0 kB view details)

Uploaded PyPy manylinux: glibc 2.17+ ARM64

routrie-0.4.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl (200.7 kB view details)

Uploaded PyPy manylinux: glibc 2.5+ x86-64

routrie-0.4.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl (183.8 kB view details)

Uploaded PyPy macOS 10.7+ x86-64

routrie-0.4.0-cp37-abi3-win_amd64.whl (128.3 kB view details)

Uploaded CPython 3.7+ Windows x86-64

routrie-0.4.0-cp37-abi3-win32.whl (123.6 kB view details)

Uploaded CPython 3.7+ Windows x86

routrie-0.4.0-cp37-abi3-musllinux_1_2_x86_64.whl (387.8 kB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ x86-64

routrie-0.4.0-cp37-abi3-musllinux_1_2_i686.whl (404.9 kB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ i686

routrie-0.4.0-cp37-abi3-musllinux_1_2_armv7l.whl (527.8 kB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARMv7l

routrie-0.4.0-cp37-abi3-musllinux_1_2_aarch64.whl (366.6 kB view details)

Uploaded CPython 3.7+ musllinux: musl 1.2+ ARM64

routrie-0.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (245.6 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ s390x

routrie-0.4.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (285.6 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64le

routrie-0.4.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl (293.4 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ppc64

routrie-0.4.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (186.5 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARMv7l

routrie-0.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (186.0 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

routrie-0.4.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (198.5 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ x86-64

routrie-0.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl (218.7 kB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.5+ i686

routrie-0.4.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (351.3 kB view details)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

routrie-0.4.0-cp37-abi3-macosx_10_7_x86_64.whl (182.1 kB view details)

Uploaded CPython 3.7+ macOS 10.7+ x86-64

File details

Details for the file routrie-0.4.0.tar.gz.

File metadata

  • Download URL: routrie-0.4.0.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for routrie-0.4.0.tar.gz
Algorithm Hash digest
SHA256 58396527f7fc0789f6f02ac157c796bda15375e6f0d13fe535551bb0e18b9d69
MD5 a6e384d9be9e34e1e6b6c410c36a0fcb
BLAKE2b-256 817c4cd9cc2356a58c64b98ff102e9c5b5517389fc3e2df10f31fe64e751764e

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 96b5cd28a1b2f768b40fd543c5e9a330e42f55cee535bb7c467e524b4837b5a9
MD5 096f51e61c28c58a74cf41948221555d
BLAKE2b-256 5b15177f818d3015a949e78be456167ea57b0fda6a14615ac5db0e8ae7b1c1d0

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a84786fe3249fe4d455fbe6bcb1a221b9bd5bb18557f3ae72aa92853dd15d9a9
MD5 1f4d1c3fc1e5b1f9fd9e2ffe3544ebe7
BLAKE2b-256 c352d1aff927406bd1b632fd7a1068f69b726e1873b8f82ea226fc8ed52a66d4

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp39-pypy39_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 83dc7eea346f297840aa5a39b52a695d696030b63ae1c0e902e7a10988abbd02
MD5 5ae31adbb35a4f1f4d5665bb5a7976aa
BLAKE2b-256 807d60098ef22e937ad953d16fbbb422cae82b5d7f7df291ad625ff27c5b3c63

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1b101f72431f88f3801ba4c9f2b5e443ec7075ea5c0124b71697a683379f90ce
MD5 7b38886f4da75a9ff1bc8e92f9f476b5
BLAKE2b-256 f0b0b563ad805282902d898242b53fd168c892ace3d38f711772c47e3c806672

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 c6e6f1696b625d4b84365e69e7bd3fb097659ebcab3d886f496089f5e5a4b8ca
MD5 c05795199ab1183c61c553b0d21bf3b5
BLAKE2b-256 e1afe377671aae99e0e126c7251cc19bba55602f43c0c05e3957a38fd452948b

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp38-pypy38_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 e250de9c1a3976dc6f6b53ea01a16598834973a4c1662291df1955e1f7aead4f
MD5 56efcb15fbefbc715d9ce68a6125ac4f
BLAKE2b-256 0cfb4769bc4aa40bc49f8d334a1099f1857087dda3d0b8b5bc0411cf0db69665

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 96ea893af5ab0ef01ddac5e933ff7629e7246b40e9f4f440667fdaf208a424e3
MD5 635f4f154981047fd7b9256647d126e6
BLAKE2b-256 40ea13d06ad1f0ead6acb9d5f151a2d80aa16baec6da3daac5f7cf15a9fd4e6e

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 f4a5417248c9eebcf06f7f4b5942144796988f7d05ff91840ac7e29a52c98d6c
MD5 80efc29c70a6a5a9460888db6cb032d3
BLAKE2b-256 e918bf9bc774a887c32c6b52c00ada8a21b868bb67ef207176ade0e3f0f894e8

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-pp37-pypy37_pp73-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 ed06bdb7832a6734a108db6343327724f3107af680bf67d95f0dcae53a33c314
MD5 17333959523611f1e26fab412e11d021
BLAKE2b-256 7c15b74dc9102a35010acd16445488621562deb80c0bd94408bf500943c85f16

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: routrie-0.4.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

Hashes for routrie-0.4.0-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6d8b317c3a3b480f965e8348e9003477be68ceaffeee34770427c8bb62222799
MD5 f04ed04f9a73e870fc1b730900523057
BLAKE2b-256 84fb576403fe5a3f728de463d2839e9d83696f5e2128d2798a6e69786e4edd72

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-win32.whl.

File metadata

  • Download URL: routrie-0.4.0-cp37-abi3-win32.whl
  • Upload date:
  • Size: 123.6 kB
  • Tags: CPython 3.7+, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for routrie-0.4.0-cp37-abi3-win32.whl
Algorithm Hash digest
SHA256 ea2381fad0c4ff4c828380ecdb1347698a6016cd4120e01bf6b6bf47889fdf9e
MD5 4efda00ffc5c9fe63f106c3cfc62ca46
BLAKE2b-256 c793b54211b2479daf414cafa43d7f7d75c4cc83234656891409522aaee0beff

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 53cb49f3efc6fc005dd509808d95af354ccf0a39909c99a8e75ae4ea7b95f973
MD5 d57fca3b3a9638c1aa9cf8ad30a0a9ed
BLAKE2b-256 6f5a31534f44791795d0cb0a1c66ee92478485868cda4852215f597c16bc8878

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 be8ba59e4dafc359a3046d296e2782baa4bf941794e50c3df260304e62e248cf
MD5 72727b922e758fd4d1d4eacfb6996ed4
BLAKE2b-256 9bef5e65759159956fc4534f3b87aac35a10c96001dd41649682bf14a270f4fb

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 f198ac2af731c7d633a43d293470afd0f3a791cab39b18134978911705675b5e
MD5 9c37b45b4da3c81bd9461d3f9d0e1a37
BLAKE2b-256 c495d5590903ff9b2e2c0b6bd06e691dfe19a39e4755d487719d76ce12334ed0

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 8289d656a3ae2c18942615d1446fc75069347a28ca769bf9602e8f01a0a66a71
MD5 34d45aa397d5589a42f63f2249d3bdc1
BLAKE2b-256 9d7e6313f1f6cb08d07a63fcc405106a643a9a74d274c6f9ea9410e93485d5ed

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 f3cb3d62da14df95fd44701937cb284a8539cc36bbb24ef98b9b03e58133e37d
MD5 ea219309040bc5ac3de5d5bd241fca9c
BLAKE2b-256 23c54637f395c78acb5c5d3f6fc247029a91e5684e3a7636f984640c50b64cb3

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 9b5fd9c9b34cf22b011706b9ec0d1c5682d6a279c51c506c44569392c2abf244
MD5 57f3d900279358165f5194bcbe92d9ed
BLAKE2b-256 2a8329f85cf424979b200f58557a33d10ca3cf7fae8bd9eb577173856840ead6

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-manylinux_2_17_ppc64.manylinux2014_ppc64.whl
Algorithm Hash digest
SHA256 0715ffe90cbd78b4cfd432e4681e2600af8ff0f9162127bec93a8b38cf680c0e
MD5 e3aa6afd4bb6d25f4075982ea6728e07
BLAKE2b-256 fd3f64b78d426f50af10f5e62b2528ca69b9ecc95a2f0725eeb79517dd103ce1

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 e968a436aab732731f5937609bfbb27bb440bda2a8fb01ebe3e23a09a06a0259
MD5 30b6b0b35dc448288c56e7f39f8e5587
BLAKE2b-256 96645b1856a7b56ea7a99015a131a608eabb7f390370dceeb6c8d2ded52ad580

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a8b0a62386e0c2f161e894f08e7dfd1c82ab1d55dcb00e9489aa6e56d242d7d9
MD5 52c906885e5313e4ddfce1a2f733f085
BLAKE2b-256 e19b113d780a1f9910bf4c0e84b5c0caa40872c9764061b20d709d48df3fd843

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 fd1e3e20a2bae619fc79ef8bec8088251d66dce46cc636ea36c630c8e9781e23
MD5 574482044585cbec2843ae4816cb1836
BLAKE2b-256 b6e19f161110aa8f8b5c4d76861c3d4108f7894467fc641050e02562a37fc4d7

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 868b6adb9598efdb3a5339ee1aa8784183821bb36ead2e32a09579c1b8f5c02a
MD5 be40798ac31eae12c27c9ac739165ab8
BLAKE2b-256 9f6a68a32c7a7499879952ea160c59755140360ba4218b1711651a2722c5ab85

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 abb7c394977316b91c0d53ddbd27f38b0ea0d451bc37c55fc6a88b994fcaedce
MD5 1363ee14e7b54d3144e4be00533ca65b
BLAKE2b-256 5bec7831c624f3151438d96e7a72ffd77bb90d03c206dc16ea8a2dfef652b034

See more details on using hashes here.

Provenance

File details

Details for the file routrie-0.4.0-cp37-abi3-macosx_10_7_x86_64.whl.

File metadata

File hashes

Hashes for routrie-0.4.0-cp37-abi3-macosx_10_7_x86_64.whl
Algorithm Hash digest
SHA256 27e6f85807ab32a67264fcbd5451d14a24f9d49f97201933ff33cbfd100f12b0
MD5 0d1df44c73f628662da6d59364763f14
BLAKE2b-256 74fa255bd0d50b3d4fb6322f6ae869831517f0a78a5b1bbeabb2a3b4cbb6beae

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page