Skip to main content

Python SDK for in-process load execution, traffic correlation, and reporting.

Project description

LoadStrike SDK for Python

LoadStrike is a developer-first load testing SDK for Python services, jobs, and automated test suites. Use it to describe real workflows in Python, execute them in-process, and collect structured reports from the same codebase that owns the system under test.

What This SDK Is For

  • Author scenario-based load tests in Python.
  • Model transaction flows across HTTP and event-driven systems.
  • Apply load simulations, thresholds, and custom metrics during execution.
  • Generate local reports and, on eligible plans, forward results to supported reporting sinks.

Built-in transport coverage includes HTTP, Kafka, RabbitMQ, NATS, Redis Streams, Azure Event Hubs, Push Diffusion, and delegate-based custom streams. Local report output supports HTML, Markdown, TXT, and CSV, and eligible plans can publish to InfluxDB, TimescaleDB, Grafana Loki, Datadog, Splunk HEC, and OpenTelemetry Collector.

Requirements

  • Python 3.9 or later

Install

pip install loadstrike

Quick Start

from loadstrike_sdk import (
    LoadStrikeResponse,
    LoadStrikeRunner,
    LoadStrikeScenario,
    LoadStrikeSimulation,
    LoadStrikeStep,
)


def run_orders(context):
    return LoadStrikeStep.run(
        "publish-order",
        context,
        lambda: LoadStrikeResponse.ok("200"),
    ).as_reply()


scenario = (
    LoadStrikeScenario.create("orders", run_orders)
    .with_load_simulations(LoadStrikeSimulation.inject(10, 1, 20))
)

result = (
    LoadStrikeRunner.register_scenarios(scenario)
    .with_runner_key("rkl_your_runner_key")
    .run()
)

run() returns the detailed run result, including generated report files, scenario statistics, metrics, and sink status.

Runner Keys

Runnable workloads require a RunnerKey. Supply it with .with_runner_key(...) or through your application configuration before calling run().

Documentation

Project details


Download files

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

Source Distribution

loadstrike-1.0.20801.tar.gz (561.1 kB view details)

Uploaded Source

Built Distribution

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

loadstrike-1.0.20801-py3-none-any.whl (563.3 kB view details)

Uploaded Python 3

File details

Details for the file loadstrike-1.0.20801.tar.gz.

File metadata

  • Download URL: loadstrike-1.0.20801.tar.gz
  • Upload date:
  • Size: 561.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for loadstrike-1.0.20801.tar.gz
Algorithm Hash digest
SHA256 61041da388c193381e1878b3422d95ee6cf90d5dc4c26aeb4b8836a0bab8d8ba
MD5 d9ee36d6547c29b60f933414052f904c
BLAKE2b-256 6dca1dd632c7dfcdb0293939fa89d4d3779b9e77cbe283c0788f3f50c8b9166c

See more details on using hashes here.

Provenance

The following attestation bundles were made for loadstrike-1.0.20801.tar.gz:

Publisher: main-delivery.yml on Meticulis/LoadStrike

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file loadstrike-1.0.20801-py3-none-any.whl.

File metadata

  • Download URL: loadstrike-1.0.20801-py3-none-any.whl
  • Upload date:
  • Size: 563.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for loadstrike-1.0.20801-py3-none-any.whl
Algorithm Hash digest
SHA256 7ef4c0addbb4d3399e6c7d78b374702d807756a3e6c57cf3c40a8c9caf69462c
MD5 98cb802da55f2e6a0609bc98711570d7
BLAKE2b-256 c0c00c6d930409b8e376e55bfcef7dc6feaed7cb276579ba07e7e4ca3a695216

See more details on using hashes here.

Provenance

The following attestation bundles were made for loadstrike-1.0.20801-py3-none-any.whl:

Publisher: main-delivery.yml on Meticulis/LoadStrike

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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