openmeter
Client for OpenMeter: Real-Time and Scalable Usage Metering
What it is and what it does
OpenMeter Python SDK is a generated HTTP client library for interacting with the OpenMeter usage metering platform. It wraps CloudEvents-based event ingestion and meter query operations into a Python-friendly interface with both synchronous and asynchronous support. The SDK depends on cloudevents, corehttp, isodate, typing-extensions, and urllib3 to handle HTTP communication, date parsing, and type hints.
The package is designed for applications that need to track usage in real time—particularly AI/LLM workloads tracking token consumption—and aggregate that usage into queryable meters for billing or analytics. It provides methods to ingest single events or batches, list and manage meters, and query usage data in JSON or CSV format. Because it is in preview mode and uses pre-release versioning, it is suitable for early adoption and testing but should be evaluated carefully before committing to production workflows.
Use it for:
- Track AI token consumption (input/output) per customer for usage-based billing of LLM applications.
- Ingest application events (API calls, resource usage) into OpenMeter for real-time aggregation and reporting.
- Query historical meter data to build usage dashboards or generate billing reports by customer or time period.
- Manage meter definitions and subjects (customers/entities) programmatically as part of a billing system.
- Integrate usage tracking into async Python applications using the aio.Client for non-blocking event submission.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
OpenMeter Python SDK provides a client library to ingest usage events and query aggregated meter data for real-time usage tracking and billing integration.
Yes, if you are already committed to the OpenMeter platform and need a Python client to ingest and query usage data. The low install friction, permissive license, and active maintenance make it straightforward to adopt. However, the preview status and minimal community adoption mean you should treat it as an early-stage tool—verify that OpenMeter's service stability and API roadmap align with your production timeline before relying on it for critical billing workflows.
Install
openmeter on PyPI
pip
pip install openmeteruv
uv add openmeterpoetry
poetry add openmeterInstalling openmeter
Before you install
Low friction installation with a pure-wheel distribution. Actively maintained with recent releases; however, the package is in preview mode and the repository shows minimal community engagement (1 star), so stability and long-term support remain unproven.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most production integrations.
Quickstart
pip install --pre openmeter
from openmeter import Client
from openmeter.models import Event
import datetime, uuid
client = Client(endpoint="https://openmeter.cloud", token="your-api-token")
event = Event(
id=str(uuid.uuid4()),
source="my-app",
specversion="1.0",
type="prompt",
subject="customer-1",
time=datetime.datetime.now(datetime.timezone.utc),
data={"tokens": 100}
)
client.events.ingest_event(event)
Requires Python 3.9 or later; package is in preview mode and uses pre-release versioning (1.0.0b232).
Verify before relying
- Stability and breaking-change policy during preview phase—how frequently does the API surface change between beta releases?
- Production readiness guarantees or SLA commitments from the OpenMeter service itself.
- Performance characteristics under high-volume event ingestion (throughput, latency, retry behavior).
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — cloudevents, corehttp, isodate, typing-extensions, urllib3 |
| Maintenance | actively maintained — 10 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 149,774/month — #10,986 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: openmeter-1.0.0b232-py3-none-any.whl
Keywords: openmeter, api, client, usage, usage-based, metering, ai, aggregation, real-time, billing, cloud
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
axiom-pyaxiom-py provides a Python client for ingesting…
permissive · top 5,000 on PyPI
humiolibPython SDK that wraps Humio's web API to enable…
permissive · top 15,000 on PyPI
pydiscovergyAsynchronous Python client for querying…
permissive · top 15,000 on PyPI
sonic-clientPython client library for the Sonic search…
permissive · top 15,000 on PyPI
dlms-cosemA Python library for implementing DLMS/COSEM…
permissive · top 15,000 on PyPI
ovoenergyA Python client library for querying energy…
permissive · top 15,000 on PyPI
customerioPython client library for the Customer.io API,…
permissive · top 5,000 on PyPI
p1monitorAsynchronous Python client library for reading…
permissive · top 15,000 on PyPI
signalfxPython client library for sending metrics,…
permissive · top 15,000 on PyPI
stigg-sidecar-sdkPython SDK for interacting with Stigg Sidecar,…
unclear · top 15,000 on PyPI