Metewand for Python 
Write reproducible computational benchmarks with ordinary Python functions. Define how to generate data, run your methods, and evaluate their answers, then declare the comparison in YAML. The Metewand CLI runs each method in a separate process and saves timings, metrics, failures, and provenance.
This package provides the Python functions and result objects you need to write a benchmark. The CLI checks and runs it on Linux, macOS, and native Windows x64.
Install
You need Python 3.11 or later and Git. Install the package from GitHub in a virtual environment:
python3 -m venv .venv
. .venv/bin/activate
python3 -m pip install "metewand @ git+https://github.com/jolars/metewand.git@main#subdirectory=packages/python"
On Windows, use python in place of python3 and activate the environment with
.\.venv\Scripts\Activate.ps1 in PowerShell. Keep the environment active when
running benchmarks so workers can find your installed packages.
Install the separate Metewand CLI by following getting started. Installing the Python package does not install the CLI.
The base package has no third-party runtime dependencies. To include NumPy and
SciPy helpers for dense and sparse arrays, install the arrays extra:
python3 -m pip install "metewand[arrays] @ git+https://github.com/jolars/metewand.git@main#subdirectory=packages/python"
These commands install the development version. For a reproducible benchmark,
replace main with a commit hash and pin your scientific dependencies.
Try a benchmark
With the CLI and Python package installed, create and run a starter:
metewand init my-benchmark
cd my-benchmark
metewand check --workers
metewand run --output-dir run
The starter creates benchmark.py and metewand.yaml. It generates seeded
integers, compares Python's built-in sum with a loop, and independently checks
each answer. Metewand prints timings and absolute errors and saves the results
in run/.
Write your own comparison
Replace the generated functions with your data, methods, and metrics. A method and its evaluator can be as small as:
def builtin_sum(data, context):
return {"total": sum(data["values"])}
def evaluate(data, result, context):
expected = sum(data["values"])
return {"absolute_error": abs(result["total"] - expected)}
Select functions in YAML with entries such as
function: benchmark.py:builtin_sum. The context argument supplies your
parameters, a seed, and input and output directories. Use context.seed to seed
your random generator when generating data or running randomized methods.
Return dictionaries for ordinary JSON data and metrics. For benchmarks with an
accuracy target, use Evaluation(metrics, verdict) to report whether the method
reached it. Use Dataset, Result, and Artifact when you also need to return
files. The CLI records and checks those files alongside the JSON output.
Follow the authoring guide for parameter sweeps, repeated measurements, reference checks, and result exports. If your methods need separate setup and solve steps, see the Python example. For progress measurements during a solve, see the streaming example or buffered profile example.
Project status
Metewand is under active development. The Python package and CLI have separate releases; their version numbers do not need to match.
See the main repository for project news, citation information, and contributor instructions.
Metadata
Release files for metewand 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| metewand-0.4.0.tar.gz | 12.0 kB | With provenance | Details for metewand-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| metewand-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for metewand-0.4.0-py3-none-any.whl |
Total release size: 23.6 kB
Release files / metewand-0.4.0.tar.gz
| Download URL | metewand-0.4.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
329d9fe604b8b940d7c9d0764e89d1120091372571c63975b66893d958ef460f
|
|
BLAKE2b-256 checksum How to use checksums |
1bb666f0f678f0a9952a4bf08c8a87d7de3b94c60646004ffa1b1fafac91ac16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logRelease files / metewand-0.4.0-py3-none-any.whl
| Download URL | metewand-0.4.0-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48ce6f4b4bd43334370fad4ba02d39f70a75883b0fdf3d7539638660b75af941
|
|
BLAKE2b-256 checksum How to use checksums |
e2f79a8291aaf52e14d50c7c5a9919b1cf1ba75c6b16770a54ce2b1675366493
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 7, 2026.
Transparency logSecurity for metewand 0.4.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for metewand-0.4.0.tar.gz
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 Nov 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.