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.2.tar.gz (6.6 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for chaosrouter-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3e70089145ef60efe6ee5db0bdf864294173cd7725bec8e737948dd089d21ca3
MD5 6103ec854e4fee2002355dc7b660aec0
BLAKE2b-256 dfdeefee87a1c3f192afb8bf72a254fab7dbab5630e3eaf49d4e69ef725a1cf5

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