This release is a pre-release and may not be stable for production use.
rampa
A Python 3.14+ async load testing framework with headless engine, typed metrics, threshold policies, and six executor types matching k6's scheduling models. Runs on Linux and macOS.
[!WARNING] Alpha. Releases carry an
-alphaprerelease tag. The API is not settled, and any release may change or remove exported identifiers without a deprecation period. Pin an exact version. Not recommended for production.
Installation
$ uv add rampa
Quick Start
Write a test script:
import rampa
@rampa.scenario(executor="constant-vus", vus=10, duration="30s")
async def default(worker: rampa.Worker) -> None:
resp = await worker.http.get("https://test.k6.io")
worker.check(
resp,
{
"status is 200": lambda r: r.status == 200,
},
)
Run it:
$ rampa run load_test.py
Full Example
import rampa
config = rampa.Config(
scenarios={
"load": rampa.ScenarioConfig(
executor="ramping-arrival-rate",
rate=10.0,
stages=[
rampa.Stage(duration="1m", target=100),
],
pre_allocated_vus=50,
max_vus=200,
),
},
thresholds={
"http_req_duration": ["p(95)<500"],
"http_req_failed": ["rate<0.01"],
},
)
async def setup() -> dict[str, str]:
return {"base_url": "https://staging.example.com"}
@rampa.scenario("load")
async def load_test(worker: rampa.Worker) -> None:
resp = await worker.http.get(f"{worker.setup_data['base_url']}/api/users")
worker.check(
resp,
{
"status is 200": lambda r: r.status == 200,
"body has users": lambda r: len(r.json()["users"]) > 0,
},
)
Headless Engine API
For programmatic use (pytest, TUI, MCP, CI):
import asyncio
import rampa
from rampa.loader import load_test
plan = load_test("load_test.py")
controller = await rampa.Engine(plan).start()
# Poll metrics while running
snapshot = controller.snapshot()
# Or consume events
async for event in controller.events():
print(event)
result = await controller.wait()
print(result.status) # RunStatus.PASSED / THRESHOLD_FAILED / ...
CLI
$ rampa run script.py --vus 10 --duration 30s --out result.json
Exit codes: 0 = passed, 1 = threshold failed, 2 = iteration error, 3 = invalid config, 4 = aborted, 5 = setup failure, 6 = output failure, 7 = teardown failure.
Executors
| Executor | Model | Description |
|---|---|---|
constant-vus |
Closed | Fixed N VUs for a duration |
ramping-vus |
Closed | Linear VU ramp between stages |
shared-iterations |
Closed | N VUs share M total iterations |
per-vu-iterations |
Closed | Each VU runs exactly N iterations |
constant-arrival-rate |
Open | Timer-based scheduling, dropped iterations |
ramping-arrival-rate |
Open | Rate interpolation between stages |
Links
- Source: https://github.com/tony/rampa
- Issues: https://github.com/tony/rampa/issues
- Docs: https://rampa.git-pull.com/
- Changelog: CHANGES
- License: MIT
Release files for rampa 0.0.1a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| rampa-0.0.1a2.tar.gz | 77.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rampa-0.0.1a2-cp314-cp314-manylinux_2_34_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.34+ x86-64 | Details |
Total release size: 456.2 kB
Release files / rampa-0.0.1a2.tar.gz
| Download URL | rampa-0.0.1a2.tar.gz |
|---|---|
| Size | 77.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7619427ca0f41990d32d57c7418e73929a0823f6f5e7e6b077b8835f1f0e3bfe
|
|
BLAKE2b-256 checksum How to use checksums |
ffec0905beb72abe53c3ee8d615daecffb5dc1d0229e443e35f920d0e2395b73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency logRelease files / rampa-0.0.1a2-cp314-cp314-manylinux_2_34_x86_64.whl
| Download URL | rampa-0.0.1a2-cp314-cp314-manylinux_2_34_x86_64.whl |
|---|---|
| Size | 378.5 kB |
| Tags | CPython 3.14 Linux glibc 2.34+ x86-64 |
|
SHA-256 checksum How to use checksums |
8ded9657df7345d4cc249ee7608e5f1dc7794f2bd195a066ef46795df1bc991c
|
|
BLAKE2b-256 checksum How to use checksums |
3146e5b1a5630606ab4f005334cd35c271ac080a7df13d25718cc2f027515ed6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.
Transparency log