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 routerSimpleRegexRouter
: simple regex-based 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.5.tar.gz
(4.6 kB
view hashes)
Built Distribution
Close
Hashes for tiny_router-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b0a16b6b8567bfd7228e190346c20fc68401781b7993b95f46ce86de6ac2837 |
|
MD5 | 89c680c42a35590ee039afee9e5db825 |
|
BLAKE2b-256 | a2b538e56bd9a0f16824a4b0c399eb9d692b4a5cbfba15b45c14eb40df88d55e |