CloadTester 🚀
CloadTester (cloadtester) is a high-performance Python API load testing library backed by a native C++ multithreaded engine.
Unlike pure Python threading libraries which are constrained by the Global Interpreter Lock (GIL), CloadTester executes concurrent HTTP/HTTPS requests on true native OS C++ threads (std::thread), unlocking true parallel multi-core performance.
Key Features
- True Parallel Multithreading: C++ releases the Python GIL during load test execution.
- High Accuracy & Microsecond Precision: High-resolution timer metrics (
std::chrono). - Zero Third-Party Binary Dependencies: Uses native platform APIs (WinHTTP on Windows, POSIX Sockets on Linux/macOS).
- Rich Latency Analytics: Calculates Min, Mean, Max, P50, P90, P95, and P99 percentiles along with Requests Per Second (RPS).
- Python API & CLI Tool: Use as a standard Python module or via the command-line interface
cload-test.
Installation
Install directly from PyPI (once published):
pip install cloadtester
Or install locally for development:
pip install -e .
Quick Start Guide
1. Using Python API
from cloadtester import LoadTester
from cloadtester.reporter import print_summary
# Configure your API load test
tester = LoadTester(
url="https://httpbin.org/post",
method="POST",
headers={"Authorization": "Bearer sample_token"},
json_payload={"user_id": 101, "action": "benchmark"},
timeout_ms=5000
)
# Run with 10 threads, performing a total of 100 requests
result = tester.run(num_threads=10, total_requests=100)
# Print formatted summary report
print_summary(result)
# Access programmatically
print(f"RPS: {result.requests_per_sec:.2f}")
print(f"P95 Latency: {result.percentile(95):.2f} ms")
2. Using Command-Line Tool (cload-test)
# Simple GET request load test
cload-test https://httpbin.org/get -t 10 -n 100
# POST request with JSON payload and custom headers
cload-test https://httpbin.org/post -m POST -t 20 -n 200 -d '{"key": "value"}' -H "Content-Type: application/json"
How to Publish to PyPI
Follow these steps to publish cloadtester to PyPI:
Step 1: Install Publishing Dependencies
pip install build twine
Step 2: Build Source Distribution and Binary Wheel
python -m build
This generates dist/cloadtester-0.1.0.tar.gz and dist/cloadtester-0.1.0-*.whl.
Step 3: Check Build Distribution
twine check dist/*
Step 4: Upload to PyPI
To upload to TestPyPI first:
twine upload --repository testpypi dist/*
To upload to production PyPI:
twine upload dist/*
License
MIT License. Free for commercial and open-source use.
Metadata
Release files for cloadtester 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cloadtester-0.1.3.tar.gz | 13.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cloadtester-0.1.3-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
Total release size: 21.8 kB
Release files / cloadtester-0.1.3.tar.gz
| Download URL | cloadtester-0.1.3.tar.gz |
|---|---|
| Size | 13.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01ea50e8f96a5882e062571e3e456bbb8f46a8b38d1f1c887ba5f69ca3112aec
|
|
BLAKE2b-256 checksum How to use checksums |
a4e0a9534681eb45f5f276ea312e797e532e282c72a6e41650db9d601fd4e67f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / cloadtester-0.1.3-cp312-cp312-win_amd64.whl
| Download URL | cloadtester-0.1.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 8.2 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9d73a49ec3b268a5fab80c1f03983359896b07dafa556b22a76e1d5d1c5f0aa6
|
|
BLAKE2b-256 checksum How to use checksums |
05aa2520ddedbd694b57a537e2290a7d1fb76cb6de8e57a8d3f38f441fda98a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|