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.4.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for tiny_router-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 797492df430b7da681d9c39563eeffbe0fda3db6ad4b530b5dc51830d8fdee93 |
|
MD5 | 1f2925cd99d6139102a006ff2f28c2cd |
|
BLAKE2b-256 | 2bc5145ecddae70f6ded597b72af1c85191e3ea717c89fba026686ed41ad341f |