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

Uploaded Source

File details

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

File metadata

File hashes

Hashes for chaosrouter-0.2.6.tar.gz
Algorithm Hash digest
SHA256 0fa8a88e46d499cd04d1df1a91ae63130d4ba714527cd6679ee00e8e2028126e
MD5 43d839504a815fd2d95568a3b2a27e59
BLAKE2b-256 585bfa2e3c3dd2988e4a00daccc087cf8cffae8931f07387b4b85b6218314d47

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