Dead simple, Self-Contained, single-file API load testing tool built on FastAPI.
A lightweight tool for ad-hoc API testing. It generates controlled request loads, customizes headers and payloads, collects latency metrics, and runs anywhere with minimal setup — just launch and start testing.
- Zero Configuration - One file, one command
- Self-Contained - Uses uv's inline metadata format
- FastAPI Swagger UI - Beautiful Swagger UI interface;
- Async Load Testing - Built on httpx (encode) and asyncio
- Real-time Results - View metrics in stdout during execution
- Container Ready - Works in any environment (uv handles it)
Install uv with the official script or via pip if Python is available on your laptop or server.
# Download and run the tool directly
curl -LOs https://github.com/sesav/scapi-py/releases/latest/download/scapi.py
uv run scapi.py
# Or with wget
wget https://github.com/sesav/scapi-py/releases/latest/download/scapi.py
uv run scapi.py
# Install from PyPI
pip install scapi-py
# Run the tool
scapi
# Install with uv
uv add scapi-py
# Run the tool
scapi
- Open http://localhost:8000 in your browser
- Use the
/load
endpoint to send requests - Check
/results
for metrics and response times
Send load test requests to a target URL.
Parameters:
url
(string, required) - Target URL to testmethod
(string, required) - HTTP method (GET, POST, PUT, etc.)attempts
(int, default: 10) - Number of requests to senddelay
(float, default: 0.1) - Delay between requests in secondsheaders
(dict, optional) - Custom HTTP headersbody
(dict, optional) - Request body for POST/PUT requestsresponse_header
(bool, default: false) - Include response headers in stdoutresponse_body
(bool, default: false) - Include response body in stdout
Get aggregated test results and metrics.
Response:
{
"results": {
"200": 10,
"404": 2
},
"average_request_time": 0.25
}
docker run -ti --rm -p "8000:8000" python:3.12-slim-bookworm bash
Then follow the installation steps inside the container.
Configure your load test parameters
View real-time results and metrics
It's important to understand that this is a very simple, single-threaded application. Its purpose is to perform small, quick tests by generating a limited number of requests, and it can run in almost any environment where the uv binary is available. If you need serious load testing at scale, consider more robust solutions such as Locust, Apache JMeter, or similar tools.
# Clone the repository
git clone https://github.com/sesav/scapi-py.git
cd scapi-py
# Install development dependencies
make install
# Run tests
make test
# Run
make run
- Python 3.10+
- uv package manager
- wget or curl (for installation)
This project is licensed under the MIT License.