Skip to main content

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cloadtester-0.1.3.tar.gz (13.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cloadtester-0.1.3-cp312-cp312-win_amd64.whl (8.2 kB view details)

Uploaded CPython 3.12Windows x86-64

File details

Details for the file cloadtester-0.1.3.tar.gz.

File metadata

  • Download URL: cloadtester-0.1.3.tar.gz
  • Upload date:
  • Size: 13.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.10

File hashes

Hashes for cloadtester-0.1.3.tar.gz
Algorithm Hash digest
SHA256 01ea50e8f96a5882e062571e3e456bbb8f46a8b38d1f1c887ba5f69ca3112aec
MD5 02e25e544d87f9cf44ba52223ae6b390
BLAKE2b-256 a4e0a9534681eb45f5f276ea312e797e532e282c72a6e41650db9d601fd4e67f

See more details on using hashes here.

File details

Details for the file cloadtester-0.1.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for cloadtester-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9d73a49ec3b268a5fab80c1f03983359896b07dafa556b22a76e1d5d1c5f0aa6
MD5 9e5488f9a67e51930c271095935c84c9
BLAKE2b-256 05aa2520ddedbd694b57a537e2290a7d1fb76cb6de8e57a8d3f38f441fda98a3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page