https://github.com/adriangb/routrie
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.5%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: adriangb
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Size: 63.5 KB
Statistics
- Stars: 17
- Watchers: 2
- Forks: 0
- Open Issues: 1
- Releases: 0
Metadata Files
README.md
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:
```python 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).
Owner
- Name: Adrian Garcia Badaracco
- Login: adriangb
- Kind: user
- Location: Chicago, IL
- Repositories: 172
- Profile: https://github.com/adriangb
GitHub Events
Total
Last Year
Committers
Last synced: 12 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Adrian Garcia Badaracco | 1****b | 27 |
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 0
- Total pull requests: 3
- Average time to close issues: N/A
- Average time to close pull requests: about 6 hours
- Total issue authors: 0
- Total pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.33
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- adriangb (2)
- dependabot[bot] (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- bitflags 1.3.2
- cfg-if 1.0.0
- indoc 1.0.6
- instant 0.1.12
- libc 0.2.112
- lock_api 0.4.5
- once_cell 1.9.0
- parking_lot 0.11.2
- parking_lot_core 0.8.5
- path-tree 0.4.0
- proc-macro2 1.0.36
- pyo3 0.16.5
- pyo3-build-config 0.16.5
- pyo3-ffi 0.16.5
- pyo3-macros 0.16.5
- pyo3-macros-backend 0.16.5
- quote 1.0.14
- redox_syscall 0.2.10
- scopeguard 1.1.0
- smallvec 1.7.0
- syn 1.0.85
- target-lexicon 0.12.4
- unicode-xid 0.2.2
- unindent 0.1.7
- winapi 0.3.9
- winapi-i686-pc-windows-gnu 0.4.0
- winapi-x86_64-pc-windows-gnu 0.4.0
- path-tree ^0.4.0
- pyo3 ^0.16.0
- http-router ==2.6.5
- starlette ==0.20.3
- maturin ==0.13.0b6
- pre-commit ==2.19.0
- pytest ==7.1.2
- actions-rs/toolchain v1 composite
- actions/checkout v3 composite
- actions/checkout v2 composite
- actions/download-artifact v2 composite
- actions/setup-python v4 composite
- actions/setup-python v2 composite
- actions/upload-artifact v2 composite
- addnab/docker-run-action v3 composite
- messense/maturin-action v1 composite
- uraimo/run-on-arch-action v2.0.5 composite
- uraimo/run-on-arch-action master composite