--- id: openmeter version: "1.0.0b232" license: Apache-2.0 license_treatment: permissive maintenance: active --- # openmeter — Client for OpenMeter: Real-Time and Scalable Usage Metering License: permissive · Maintenance: active · Downloads: 149.8K/mo ## 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 above — 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 pip install openmeter uv add openmeter 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_current - Install friction: low - Maintenance: active - Downloads: 149.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags usage metering client, event ingestion api, real-time billing integration, usage aggregation sdk, meter query client, usage-based pricing, ai token tracking, metering, usage-tracking, billing-integration [View on SkillFed](https://skillfed.io/packages/openmeter) · [View on PyPI](https://pypi.org/project/openmeter/)