Skip to main content

Workload framework

Project description

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.

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

dbworkload-0.13.0.tar.gz (50.3 kB view details)

Uploaded Source

Built Distribution

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

dbworkload-0.13.0-py3-none-any.whl (56.3 kB view details)

Uploaded Python 3

File details

Details for the file dbworkload-0.13.0.tar.gz.

File metadata

  • Download URL: dbworkload-0.13.0.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dbworkload-0.13.0.tar.gz
Algorithm Hash digest
SHA256 7eb6a37cb96cf697bedf1ea8f21c6036000182c9709248928214c00222f6470d
MD5 249ff37a97f75375036eafde9d7793ff
BLAKE2b-256 cabc19b8240482fc5b6a28df225a953c417f4a2eb1b0e39b4dfd61ce075638b2

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbworkload-0.13.0.tar.gz:

Publisher: publish-to-pypi.yml on dbworkload/dbworkload

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

File details

Details for the file dbworkload-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: dbworkload-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 56.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for dbworkload-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0f89d79e5db0da6d601d9e5ea68cf60c34a9efab9ebf830fd78e4775ce9e6e68
MD5 cb5e099aa4d124fd878f7d7f87378104
BLAKE2b-256 89e827ec79a237b8c03f9afa36aaf9b26a01d8fb0f8e2a19501c3bce0f23042e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dbworkload-0.13.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on dbworkload/dbworkload

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