metronome-sdk
The official Python library for the metronome API
Decision gist · record as of 2026-08-14
Yes. This is the official, actively maintained SDK for a billing platform API, with low install friction, permissive licensing, no known vulnerabilities, and comprehensive type support. Install it if you need to integrate with Metronome's usage ingestion or billing APIs from Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires METRONOME_BEARER_TOKEN environment variable or explicit bearer_token parameter to authenticate with the Metronome API.
- Low install friction with a pure-Python wheel.
- Actively maintained with a recent release 22 days ago.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most production environments.
last release 2026-07-23 (22 days) · last repo commit 2026-08-11 · 4 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 492,267 downloads/mo, #6,361 on PyPI
Alternatives
Verify before relying
pip install metronome-sdk
import os
from metronome import Metronome
client = Metronome(
bearer_token=os.environ.get("METRONOME_BEARER_TOKEN")
)
client.v1.usage.ingest(
usage=[{
"transaction_id": "90e9401f-0f8c-4cd3-9a9f-d6beb56d8d72",
"customer_id": "team@example.com",
"event_type": "heartbeat",
"timestamp": "2024-01-01T00:00:00Z",
"properties": {"cpu_seconds": 60}
}]
)- Whether the library's auto-pagination handles all edge cases and rate-limit scenarios correctly.
- Performance characteristics when ingesting high-volume usage events or handling large paginated responses.
- Stability and feature completeness of the MCP Server integration mentioned in the description.
What it is and what it does
Metronome SDK is the official Python client for the Metronome billing and usage API. It wraps the REST API with full type annotations (TypedDicts for requests, Pydantic models for responses), offering both synchronous and asynchronous clients powered by httpx. The library handles authentication via bearer token, provides auto-paginating iterators for list endpoints, and includes error handling for connection and API status issues.
Typical use is ingesting usage events (with transaction IDs, customer IDs, timestamps, and custom properties), querying contracts and products, and managing billing configurations. The async client can optionally use aiohttp as its HTTP backend for improved concurrency. All responses include helper methods for JSON serialization and dictionary conversion, and the library supports modern Python versions from 3.9 onward.
Use it for
- Ingest usage events (CPU seconds, API calls, storage) into Metronome for billing calculations.
- Query contracts and products with automatic pagination across result sets.
- Build billing integrations in async applications using AsyncMetronome with httpx or aiohttp.
- Manage customer billing configurations and retrieve typed responses with IDE autocomplete.
- Handle API errors gracefully with specific exception types for connection and status failures.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is the official, actively maintained SDK for a billing platform API, with low install friction, permissive licensing, no known vulnerabilities, and comprehensive type support. Install it if you need to integrate with Metronome's usage ingestion or billing APIs from Python.
Install
metronome-sdk on PyPI
Before you install
Low install friction with a pure-Python wheel. Actively maintained with a recent release 22 days ago. Supports modern Python versions (3.9 through 3.14) and declares all dependencies explicitly.
Requires METRONOME_BEARER_TOKEN environment variable or explicit bearer_token parameter to authenticate with the Metronome API.
License in practice
Licensed under Apache-2.0 (permissive), allowing commercial and private use with minimal restrictions—suitable for most production environments.
Quickstart
pip install metronome-sdk
import os
from metronome import Metronome
client = Metronome(
bearer_token=os.environ.get("METRONOME_BEARER_TOKEN")
)
client.v1.usage.ingest(
usage=[{
"transaction_id": "90e9401f-0f8c-4cd3-9a9f-d6beb56d8d72",
"customer_id": "team@example.com",
"event_type": "heartbeat",
"timestamp": "2024-01-01T00:00:00Z",
"properties": {"cpu_seconds": 60}
}]
)
Verify before relying
- Whether the library's auto-pagination handles all edge cases and rate-limit scenarios correctly.
- Performance characteristics when ingesting high-volume usage events or handling large paginated responses.
- Stability and feature completeness of the MCP Server integration mentioned in the description.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesanyiodistrohttpxpydanticsniffiotyping-extensions |
| Maintenance | Actively maintained 22 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 492,267 / month, #6,361 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIXOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: metronome_sdk-4.10.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “metronome api client”
- metronome-sdkProvides a Python client library for the Metronome REST API with full…
- codewords-clientA Python client library for the Codewords API with built-in FastAPI…
- twentyc.rpcA client library for consuming 20c's RESTful API, built on top of the…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also modern-treasury · supermemory · composio-client · agentex-client · vapi-server-sdk · python-intercom · runloop_api_client · opencode-ai · sambanova · pipedream