Unimeter records every event, aggregates usage in real time, and answers billing questions in microseconds. One binary, zero dependencies, self-hosted.
pip install unimeter-python No database. No message broker. No orchestration framework. Your application talks to Unimeter over a compact binary protocol, and the entire surface area is two methods.
client, _ := billing.New([]string{"localhost:7001"}) defer client.Close() // describe what you want to count client.Metrics.Create(ctx, billing.MetricSchema{ Code: "api_calls", AggType: billing.AggCount, }) // record usage as it happens client.Ingest(ctx, []billing.Event{ {AccountID: 42, MetricCode: "api_calls", Value: 1}, }) // read the billing total, in microseconds usage, _ := client.Query(ctx, billing.QueryRequest{ AccountID: 42, MetricCode: "api_calls", Period: billing.CurrentMonth(), })
async with AsyncClient(["localhost:7001"]) as client: # describe what you want to count await client.metrics.create(MetricSchema( code="api_calls", agg_type=AggType.COUNT, )) # record usage as it happens await client.ingest([ Event(account_id=42, metric_code="api_calls", value=1), ]) # read the billing total, in microseconds usage = await client.query(42, "api_calls", current_month())
Ingest records, Query reads. The client handles cluster topology, routing, retries, and failover for you.
Every event is written to disk and replicated to a quorum of nodes before Unimeter confirms receipt. A crash after the "ok" cannot lose it.
COUNT, SUM, MAX, LATEST and COUNT_UNIQUE cover per-call billing, metered infra, seat counts and prepaid balances.
One binary you run on your own infrastructure. No per-event vendor pricing, no data leaving your network, no third party owning your billing truth.
Events land in microseconds, totals come back faster. Over four million events per second on a three-node cluster, with headroom to grow.
Every write is fsynced and quorum-replicated before acknowledgement. A deterministic simulator replays thousands of failure scenarios against formal invariants.
The client handles topology, routing, retries and failover. Your application code gets Ingest and Query, and nothing else to maintain.
3-node cluster · AMD Ryzen 7 7700X · NVMe · private VLAN. Reproducible from the benchmarks repository.
Each node runs a single-threaded event loop, so one instance is bound by disk throughput, not CPU. Past 8 workers the curve is flat — extra workers, and extra cores, buy nothing. You scale Unimeter by adding nodes, not by sizing up a single box.
Charge by the call, the request, or the token. Attach tags to break usage down by endpoint, feature, or plan tier.
Measure compute seconds, storage gigabytes, or bandwidth across regions and providers with one metric and a few dimensions.
Track who is active right now, not just who signed up. Unique counting keeps the total accurate as teams grow and shrink.
Combine sums, thresholds, and real-time queries to power dashboards that show remaining credits the instant they change.
Pull the image, install the client, send your first event, query the total back. No account, no signup, no card.