Route path based requests to JSON endpoints. Designed for web APIs
Usage examples
from chaosrouter import ChaosRouter
router = ChaosRouter({
"404": {
"error": "Not Found",
"message": "The page you are looking for does not exist",
"code": 404
}
})
Draft = router.route("/404")
data = Draft.proceed()
print(data)
# Output:
# {
# "error": "Not Found",
# "message": "The page you are looking for does not exist",
# "code": 404
# }
Release files for chaosrouter 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chaosrouter-0.2.4.tar.gz | 5.8 kB | Details |
Release files / chaosrouter-0.2.4.tar.gz
| Download URL | chaosrouter-0.2.4.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
582a929fb07ad75ab1f2c3fd12b56e3d52daff9d348519a7e714f5c8fae05b6a
|
|
BLAKE2b-256 checksum How to use checksums |
e21aac029e91f0a6f907ac9e120581b2e80d5e58afb67963b7c8c13b1bd50669
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |