A shared Rust core. A familiar Python API.

The MetriCraft field guide

Queries,
thoughtfully
composed.

Build PromQL and MetricsQL with immutable expressions. Save the string. Query your backend. Keep the choices yours.

Choose filters. See the Python and PromQL. Try sample data.

Python 3.8+Rust coreApache 2.0
request_rate.pyPYTHON
from metricraft import QueryBuilder as Q

requests = (
    Q.from_metric("http_requests_total")
    .where_eq("job", "api")
)

query = requests.rate("5m").sum().by("job")
text = query.build("promql")
Generated PromQLsum by (job) (rate(http_requests_total{job="api"}[5m]))

Derive a new expression.
The original stays yours to reuse.

Why immutable? ↗
A small SDK. A clear boundary.

From a user's choice
to a useful answer.

Queries change with your application.
Your infrastructure doesn't need to.

Go a little deeper

Built to be
understood.

Start with a working example.
Follow the details as far as you need.

Open source, in the open

A query is a good place to start.

Native wheels are available on PyPI. Install MetriCraft, try an example, and help shape what comes next.

Find us on GitHub ↗
Explore the docs

Find your next step

Search guides, examples and the Python API.