Skip to main content

Route path based requests to JSON endpoints. Designed for web APIs

Project description

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
# }

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

chaosrouter-0.2.1.tar.gz (6.6 kB view details)

Uploaded Source

File details

Details for the file chaosrouter-0.2.1.tar.gz.

File metadata

File hashes

Hashes for chaosrouter-0.2.1.tar.gz
Algorithm Hash digest
SHA256 b578961858f5baded6d78eb9e79f282a5609d968716a222877c6689fd2671a89
MD5 f2ebd317f837b45872050e5083eadc0b
BLAKE2b-256 402b8ad078fc373254ebb4465ba48ba749af8d10162030c805ece9612cad6832

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page