PyForge is sold only here, on the official py-forge.com website — beware of imitations.

Back to the catalog

ChaosProxy

#python#chaos-engineering#proxy#testing

Test retries, timeouts and circuit breakers before a real incident does.

$29 Commercial License
Or get every tool, current and future, for $99 with the All-Access Pass

After payment you get an email with your download link within a few minutes. The link is valid for 7 days.

Digital goods. If a tool doesn't work as described, we fix it or refund you — see Terms.

Not sure? Try the free MockForge sample first.

Key features

  • Rules via a JSON API under /__chaos: latency with jitter, any HTTP error, dropped connections, corrupted responses
  • Each rule matches a path pattern, method and probability
  • No rules: traffic passes through unchanged

requirements.txt — aiohttp, multidict

What's in the ZIP

  • LICENSE
  • README.md — up and running in under a minute
  • chaosproxy.py — complete, readable source code
  • requirements.txt — aiohttp, multidict

Why PyForge: Ready-made tools with full source code.

More details

Test retries, timeouts and circuit breakers before a real incident does. ChaosProxy sits between your service and a dependency and injects failures when your tests ask for them. - Rules via a JSON API under /__chaos: latency with jitter, any HTTP error, dropped connections, corrupted responses - Each rule matches a path pattern, method and probability - No rules: traffic passes through unchanged Runs with: Python 3 + aiohttp and multidict (pip install -r requirements.txt).

ChaosProxyAPIs & Testing
Read the technical deep-diveHardening Distributed Python Systems with ChaosProxy
chaosproxy.pybashExample usage — chaosproxy.py
pip install -r requirements.txt
python3 chaosproxy.py --upstream http://127.0.0.1:5700 --port 8780 --host 127.0.0.1

# Make 30% of POST /payments calls return 503
curl -X POST http://127.0.0.1:8780/__chaos/rules -H "Content-Type: application/json" \
  -d '{"path_pattern": "^/payments", "method": "POST", "probability": 0.3,
       "fault_type": "http_error", "params": {"status_code": 503}}'

Quick Start

Runs on Python 3.9 or newer. It needs these packages: aiohttp, multidict. Install them first with pip install -r requirements.txt.

1 — Install the dependencies

pip install -r requirements.txt

2 — Run it

python chaosproxy.py --help

How agents & programs use it: Install its requirements in a virtual environment; scripts and AI agents can then run it as a subprocess.

Why developers buy from PyForge

  • Save hours: ready-made, tested tools. Skip writing, debugging and maintaining it yourself.
  • Ready in minutes: one file, drop it in your project and run it.
  • Mostly zero-dependency: no pip install chains, no supply-chain risk.
  • Full source code: readable, auditable, yours to modify.
  • Runs locally and offline: no account, no API key, no data leaves your machine.
  • Pay once, own it: no subscription.
  • Tested before release: every tool is checked before it goes on sale.

All-Access Pass

Get every PyForge tool with the All-Access Pass

48 tools today plus every future release, lifetime commercial license, one payment of $99.

This tool: $29 · All 48 tools: $99

See the All-Access Pass