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.7.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for tiny_router-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62e321c67b73cc9a52e22f7107e55ac45fa7d9693eb38598456d51e57dea3c2a |
|
MD5 | 18760e4e9a82cc5200cd85638356fec7 |
|
BLAKE2b-256 | 8aa5d67a6983457555370f6ac9342453f4e71a012bfe4c3a958c415a5722cf6b |