Skip to content

romantolkachyov/python-matchit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-matchit package contains binding for matchit rust library.

Installation

pip install python-matchit

Usage

from matchit import Router
router = Router()
router.insert("/users/{id}", "test_id")

res = router.at("/users/123")

assert res.value == "test_id"
assert res.params == {"id": "123"}

try:
    assert r.at("/noway")
except LookupError:
    print("Not found as expected")

About

Python bindings for matchit Rust library

Resources

Stars

Watchers

Forks

Packages

No packages published