skillfed

openmeter

Client for OpenMeter: Real-Time and Scalable Usage Metering

openmeter v1.0.0b232 149.8K downloads/30d#10,986 on PyPI1
Permissive license Apache-2.0 Active released

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 openmeter

uv

uv add openmeter

poetry

poetry add openmeter

Installing 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

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Tags

usage metering clientevent ingestion apireal-time billing integrationusage aggregation sdkmeter query clientusage-based pricingai token tracking
meteringusage-trackingbilling-integration

More WWW/HTTP packages