Skip to main content

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

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

Uploaded Source

File details

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

File metadata

  • Download URL: chaosrouter-0.2.4.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for chaosrouter-0.2.4.tar.gz
Algorithm Hash digest
SHA256 582a929fb07ad75ab1f2c3fd12b56e3d52daff9d348519a7e714f5c8fae05b6a
MD5 e49af5f391f0d2ad082301b970645ea7
BLAKE2b-256 e21aac029e91f0a6f907ac9e120581b2e80d5e58afb67963b7c8c13b1bd50669

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.7

1 file

0.2.6

1 file

0.2.5

1 file

This release

0.2.4 This release

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.1.0

Supported by

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