Skip to main content

dbworkload

dbworkload is a Python utility for creating and running bespoke database workload scripts.

It is designed for cases where you want full control over the workload logic, but do not want to rebuild the surrounding execution machinery every time. You write the workload as a Python class; dbworkload handles the operational pieces around it, such as concurrency, process/thread execution, run duration, iteration limits, scheduling, metrics collection, and result output.

Why use it?

Database workloads are often highly specific: the order of transactions, the statements inside each transaction, the shape of generated data, and the way that data changes over time all matter. dbworkload keeps that logic in your hands while providing a reusable runner around it.

With dbworkload, you can:

  • model realistic application flows as Python code;
  • control which transactions run, in which order, and with which data;
  • scale execution across configurable processes, threads, and connections;
  • run workloads for a fixed duration or number of iterations;
  • collect and export execution statistics;
  • target different databases by installing the driver extras you need.

How it works

A workload is a Python class that defines how connections are set up and what each execution loop should do. At runtime, dbworkload imports that class, starts the requested level of concurrency, opens database connections, executes the workload loop, aggregates stats, and stops when the configured limit is reached or the run is interrupted.

This split keeps the workload script focused on database behavior while the runner handles the repeatable mechanics of executing it.

Documentation

The README is only a short introduction. For installation, examples, CLI reference, supported drivers, and workload authoring details, visit the official documentation:

https://dbworkload.github.io/dbworkload/

MCP Server

dbworkload also ships an optional MCP server for AI coding agents. It exposes workload authoring guidance and a one-iteration dry-run tool so agents can generate, validate, and repair workload files locally.

See dbworkload/mcp/README.md for installation and client configuration examples.

License

dbworkload is released under the Apache License Version 2.0 license.

Metadata

Release files for dbworkload 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbworkload 0.16.0
File Size Uploaded
dbworkload-0.16.0.tar.gz 68.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dbworkload 0.16.0
File Interpreter ABI Platform
dbworkload-0.16.0-py3-none-any.whl Python 3 none any Details

Total release size: 144.3 kB

Release files / dbworkload-0.16.0.tar.gz

Download URL dbworkload-0.16.0.tar.gz
Size 68.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1076866796bbf50ef05df27ec567d6fab81a32de3f1de2f0c728d8edf1fecd2d
BLAKE2b-256 checksum
How to use checksums
ffdf4c4ff9885131b03ea2a748a5f25fe12b85b7f6f90bf4a1597d10f1c55ee2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 26, 2026.

Transparency log

Release files / dbworkload-0.16.0-py3-none-any.whl

Download URL dbworkload-0.16.0-py3-none-any.whl
Size 76.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d94042cd332c003a24dd6dbad6b620e7a516e2efcda060d28b85237bbfcda4b4
BLAKE2b-256 checksum
How to use checksums
8b2b747cfd04e308e5e3522ff530b4c4c9b6f2525b99cd72c6dee26048c2a5ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jun 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.2

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.11.2

2 release files

0.6.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page