Skip to main content

metricraft

One SDK for immutable PromQL/MetricsQL construction and synchronous/asynchronous Prometheus/VictoriaMetrics HTTP requests. Import QueryBuilder, DatabaseClient, PrometheusConfig, VMSingleConfig and VMClusterConfig from metricraft.

Requires Python 3.8+. We recommend uv to manage your project's dependencies and environment:

uv add metricraft

Or use pip:

python -m pip install metricraft

Matching wheels support Windows x86_64, Linux x86_64 with glibc 2.28+, and macOS 11+ on Intel or Apple Silicon. They require no Rust toolchain or source checkout. See the installation guide for a virtual environment setup and an offline first query.

Query construction uses the Rust library bundled in platform wheels. Source installations compile the included Rust sources and require Rust and a platform C linker. Client-only use with query strings needs no native library or provider registration. Applications own query persistence and authorization.

See the documentation for installation and examples, and the repository for contributing guidance. GitHub Actions assembles native platform wheels and validates the supported Prometheus 3.15.0 / VictoriaMetrics 1.153.0 catalogs and syntax. The sdist includes the Python SDK, both Rust crates and the Cargo lockfile.

Query timestamps preserve fractional seconds. Numeric times are epoch seconds; values whose magnitude exceeds 1e10 are interpreted as milliseconds. Ingestion converts numeric or absolute ISO/datetime inputs to exposition milliseconds; relative time strings are supported only for queries. When a range query uses a relative end, provide start explicitly. Custom transports used for health checks should implement get_text(url) for plain-text health responses.

The built-in transport supports separate (connect, read) timeout budgets, including TLS connection setup. A custom urllib opener accepts one timeout; use equal budgets with it, or supply a custom HTTP client for separate phases.

Metadata

Release files for metricraft 0.3.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 metricraft 0.3.0
File Size Uploaded Provenance
metricraft-0.3.0.tar.gz 89.7 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for metricraft 0.3.0
File
metricraft-0.3.0-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
metricraft-0.3.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details
metricraft-0.3.0-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details
metricraft-0.3.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details

Total release size: 3.8 MB

Release files / metricraft-0.3.0.tar.gz

Download URL metricraft-0.3.0.tar.gz
Size 89.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e55a364237e5268e948cd8d05f5ce2ca91ed73ac06dd1ac40f94a3962145e1d2
BLAKE2b-256 checksum
How to use checksums
7de33540b453c11f82174275ce4110f7ff7758262d59bdfa947d8bedcd7299cc
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 Oct 24, 2026.

Transparency log

Release files / metricraft-0.3.0-py3-none-win_amd64.whl

Download URL metricraft-0.3.0-py3-none-win_amd64.whl
Size 808.4 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
1dde79645dc32f7baf808ce182527a4b4086511c667fc63258da4c396a409e2c
BLAKE2b-256 checksum
How to use checksums
641ee65069abc4da33d6f7f07d2fed031903f57487d20e27520f10c2b6e7a9ab
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 Oct 24, 2026.

Transparency log

Release files / metricraft-0.3.0-py3-none-manylinux_2_28_x86_64.whl

Download URL metricraft-0.3.0-py3-none-manylinux_2_28_x86_64.whl
Size 1.0 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
405f0ff708ea9aaffc4f1168a7776cf148838a54fa00a6b958f06b898ba8fff0
BLAKE2b-256 checksum
How to use checksums
f1a2a7238fd18b2a5df51765e548e3017287b240bce554e6325ae15b4f13ae85
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 Oct 24, 2026.

Transparency log

Release files / metricraft-0.3.0-py3-none-macosx_11_0_x86_64.whl

Download URL metricraft-0.3.0-py3-none-macosx_11_0_x86_64.whl
Size 932.7 kB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
cb33d08510a1b9b8d8ae3200707a7bbea89158df4e39c2474cd1ebdbdd48acec
BLAKE2b-256 checksum
How to use checksums
d8100c2e02b59fc1058b9b1df4c89471efb069e37234ed5a8f987b5610567e5a
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 Oct 24, 2026.

Transparency log

Release files / metricraft-0.3.0-py3-none-macosx_11_0_arm64.whl

Download URL metricraft-0.3.0-py3-none-macosx_11_0_arm64.whl
Size 886.4 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
3da1686483019bf573ac6924b0de1de560fb565bfbcb7c185235bc8e41be03ed
BLAKE2b-256 checksum
How to use checksums
025794ba409fe3db06e30ae99b5f8fde290d8ec3e37406b0c1f098335d61771a
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 Oct 24, 2026.

Transparency log

Security for metricraft 0.3.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

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for metricraft-0.3.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 Oct 24, 2026.

Transparency log

A 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.

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