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

Back to the catalog

ApiBench

#python#benchmark#load-testing#api

See the tail latency users feel, not just the average.

$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

  • Any status outside 200–399 counts as an error
  • Exits 0 within your p99/error limits, 2 otherwise — CI can block a slow release
  • JSON or Markdown reports; --demo runs against a built-in test server

requirements.txt — no third-party packages needed

What's in the ZIP

  • LICENSE
  • README.md — up and running in under a minute
  • apibench.py — complete, readable source code
  • requirements.txt — no third-party packages needed

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

More details

See the tail latency users feel, not just the average. ApiBench load-tests an HTTP endpoint with concurrent requests and reports p50, p90, p95 and p99. - Any status outside 200–399 counts as an error - Exits 0 within your p99/error limits, 2 otherwise — CI can block a slow release - JSON or Markdown reports; --demo runs against a built-in test server Runs with: Python 3, zero dependencies. Each request opens a new connection, so numbers include handshakes.

ApiBenchAPIs & Testing
Read the technical deep-diveEliminating Endpoint Bottlenecks with ApiBench: A Field Guide
apibench.pybashExample usage — apibench.py
# 500 requests, 20 concurrent; exit code 2 if p99 > 50 ms
python3 apibench.py http://localhost:8000/health -n 500 -c 20 --sla-p99 50

# POST with headers and a JSON body, results saved as JSON
python3 apibench.py http://localhost:8000/api/orders -m POST \
    -H "Content-Type: application/json" -d '{"id": 1}' --json results.json

Quick Start

Runs on Python 3.9 or newer with the standard library only. Nothing to pip install.

1 — Run it

python apibench.py --help

How agents & programs use it: It uses only the Python standard library, so scripts and AI agents can run it as a subprocess without extra installs.

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