Tiny HTTP router
Project description
tiny-router
A tiny HTTP router like this:
from tiny_router import SimpleRouter
router = SimpleRouter()
@router.get("/users")
def list_users():
...
@router.post("/users")
def create_user():
...
another_router = SimpleRouter()
router.include(another_router)
route = router.resolve("GET", "/users")
Features
SimpleRouter
: exact-match router- Abstract
Router
: user can implement their own routers - Support for type hints
Usage
See examples/
directory of repository.
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
tiny-router-0.0.3.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for tiny_router-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 813a20316f126b44ff169b82a46c619e937a4bfd42b5fa76e2d0772e4cbe81ff |
|
MD5 | 230ce75942ffa9aa86ec7e92c9b6f25e |
|
BLAKE2b-256 | 371f1133e90a3f508dba54367a6e790ef9c3db23d4d921d596bde07d356367c1 |