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

Uploaded Source

File details

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

File metadata

File hashes

Hashes for chaosrouter-0.2.3.tar.gz
Algorithm Hash digest
SHA256 e66a474571ce2922369e839f27caccecea9dfb010d403cdd293900b441fb6223
MD5 e32db487c823de369156390cfa915a01
BLAKE2b-256 4f5dede79c0ad28aa16b96c534cb7e89a860e27bbec4bcc43d9d72b12cf808e9

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