Metadata-Version: 2.3
Name: apiload
Version: 0.1.0
Summary: API load testing tool that produces latency/throughput graphs
Author: Owen Zeng
Author-email: Owen Zeng <owenzeng315@gmail.com>
Requires-Dist: httpx>=0.28.1
Requires-Dist: matplotlib>=3.11.1
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# API Load Testing Tool

API load testing tool designed for performance visualization. Sends concurrent
requests to an endpoint and produces a latency/throughput graph from the
results.

## Install

```bash
uv tool install apiload
```

Or, without a permanent install:

```bash
uvx apiload <url> [options]
```

`pipx install apiload` / `pip install apiload` also work if you don't use `uv`.

## Usage

```bash
apiload <url> [options]
```

### Options

| Flag | Description | Default |
|------|-------------|---------|
| `-X`, `--method` | HTTP method to use | `GET` |
| `-n`, `--total_requests` | Total number of requests to send | `100` |
| `-c`, `--concurrency` | Number of concurrent requests | `10` |
| `-H`, `--headers` | HTTP headers, e.g. `-H "Authorization: Bearer xyz"` | none |
| `-d`, `--body` | Request body for POST/PUT requests | none |
| `--timeout` | Timeout per request in seconds | `10.0` |
| `-o`, `--output_path` | Path to save the output graph | `results.png` |

### Example

```bash
apiload https://api.example.com/ping -n 500 -c 20 -o load_test.png
```

This sends 500 requests at a concurrency of 20 and saves a latency
distribution + throughput-over-time chart to `load_test.png` in the current
directory.
