Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c96edb5
codegen metadata
stainless-app[bot] Oct 31, 2025
8541ed6
codegen metadata
stainless-app[bot] Oct 31, 2025
a0a509e
codegen metadata
stainless-app[bot] Nov 3, 2025
e844546
chore(internal): grammar fix (it's -> its)
stainless-app[bot] Nov 3, 2025
b5fb320
feat: GET-6845 get openapi specs ready for GA
stainless-app[bot] Nov 3, 2025
28bbf3e
feat: update create alert api to allow LowRemainingSeatBalanceReached…
stainless-app[bot] Nov 3, 2025
d11c2c9
codegen metadata
stainless-app[bot] Nov 4, 2025
314cc7a
codegen metadata
stainless-app[bot] Nov 6, 2025
40f6adb
codegen metadata
stainless-app[bot] Nov 6, 2025
1b168f6
codegen metadata
stainless-app[bot] Nov 6, 2025
aad0883
codegen metadata
stainless-app[bot] Nov 6, 2025
75d0be7
codegen metadata
stainless-app[bot] Nov 6, 2025
3ecb1d7
docs: document missing fields for schemas related to recurring credit…
stainless-app[bot] Nov 7, 2025
1dc4bef
codegen metadata
stainless-app[bot] Nov 7, 2025
2a40171
codegen metadata
stainless-app[bot] Nov 7, 2025
ea6b590
codegen metadata
stainless-app[bot] Nov 8, 2025
caf05b2
chore(package): drop Python 3.8 support
stainless-app[bot] Nov 10, 2025
d033920
fix: compat with Python 3.14
stainless-app[bot] Nov 10, 2025
5fd0331
codegen metadata
stainless-app[bot] Nov 10, 2025
8748946
fix(compat): update signatures of `model_dump` and `model_dump_json` …
stainless-app[bot] Nov 11, 2025
8fa8457
feat: include aggregation BM info from searchEvents
stainless-app[bot] Nov 12, 2025
29726f1
feat: [ORCH-752] Update contract creation endpoints to allow setting …
stainless-app[bot] Nov 12, 2025
4c22b19
codegen metadata
stainless-app[bot] Nov 13, 2025
728f108
codegen metadata
stainless-app[bot] Nov 13, 2025
35e26be
feat: adds external_payment_id to ExternalInvoice
stainless-app[bot] Nov 14, 2025
dbd7412
codegen metadata
stainless-app[bot] Nov 17, 2025
471ddfa
feat: [ORCH-757] Add route for get revenue system config resolver
stainless-app[bot] Nov 19, 2025
cc5e7ed
feat: remove beta language, FF, stainless skip
stainless-app[bot] Nov 19, 2025
d70fc72
feat: Add `seat_filter` field to creation request and response parame…
stainless-app[bot] Nov 21, 2025
9014e90
chore(internal): codegen related update
stainless-app[bot] Nov 21, 2025
4eb5277
feat: add quantity to plan pricing adjustment response
stainless-app[bot] Nov 24, 2025
82c61e6
feat: everything
stainless-app[bot] Nov 24, 2025
25c3ae8
fix: ensure streams are always closed
stainless-app[bot] Nov 27, 2025
041a7d2
chore(deps): mypy 1.18.1 has a regression, pin to 1.17
stainless-app[bot] Nov 27, 2025
27cc4f3
chore: update lockfile
stainless-app[bot] Dec 2, 2025
d7f37cd
chore(docs): use environment variables for authentication in code sni…
stainless-app[bot] Dec 2, 2025
260cf49
codegen metadata
stainless-app[bot] Dec 3, 2025
a8ba1ad
codegen metadata
stainless-app[bot] Dec 5, 2025
9231074
fix(types): allow pyright to infer TypedDict types within SequenceNotStr
stainless-app[bot] Dec 8, 2025
355fe47
chore: add missing docstrings
stainless-app[bot] Dec 8, 2025
db94067
codegen metadata
stainless-app[bot] Dec 9, 2025
b546ff5
feat: Return values for set customer billing configuration endpoint
stainless-app[bot] Dec 9, 2025
603d2be
codegen metadata
stainless-app[bot] Dec 10, 2025
def7660
codegen metadata
stainless-app[bot] Dec 10, 2025
2fd481c
feat: Add `commit_transactions` to the body of `/upsertAvalaraCredent…
stainless-app[bot] Dec 11, 2025
31af8fd
feat: ORCH-833/948/946/947 - updated the API to accept aws_customer_a…
stainless-app[bot] Dec 12, 2025
0dd45c5
chore(internal): add missing files argument to base client
stainless-app[bot] Dec 15, 2025
00a67e8
chore(internal): codegen related update
stainless-app[bot] Dec 16, 2025
d1b1be0
fix: use async_to_httpx_files in patch method
stainless-app[bot] Dec 17, 2025
0a160fd
feat: [ORCH-605] uses x-mint groups to enable conditional rendering o…
stainless-app[bot] Dec 17, 2025
78bab8a
codegen metadata
stainless-app[bot] Dec 18, 2025
39602a0
chore(internal): add `--fix` argument to lint script
stainless-app[bot] Dec 18, 2025
e7b6ae0
release: 3.2.0
stainless-app[bot] Dec 18, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "3.1.0"
".": "3.2.0"
}
4 changes: 2 additions & 2 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 110
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-52432b9ea19d7a6374ecb5e73a961b16134db2939efdde9a5b16897c89591168.yml
openapi_spec_hash: 4ae323c11bdc1d11d8923fa0c0b6a933
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/metronome%2Fmetronome-ed5f05cd769c4c526bb6fa73b39ef4d2cbe9dd25f28d74aa50616044579a08a0.yml
openapi_spec_hash: 279afb4420d7e359cee3bbaf078ac97b
config_hash: 5aa28b992429a1dddfb3c5b0d777d1ce
49 changes: 49 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,54 @@
# Changelog

## 3.2.0 (2025-12-18)

Full Changelog: [v3.1.0...v3.2.0](https://github.com/Metronome-Industries/metronome-python/compare/v3.1.0...v3.2.0)

### Features

* [ORCH-605] uses x-mint groups to enable conditional rendering of gated revenue system config apis ([0a160fd](https://github.com/Metronome-Industries/metronome-python/commit/0a160fd9339d99dd03b25e7ad1346d3644f873a5))
* [ORCH-752] Update contract creation endpoints to allow setting revenue system configuration ([29726f1](https://github.com/Metronome-Industries/metronome-python/commit/29726f1244f3bd558999989c058e7801a1eaacb5))
* [ORCH-757] Add route for get revenue system config resolver ([471ddfa](https://github.com/Metronome-Industries/metronome-python/commit/471ddfa40d4a2575e31f3faaaee64a929b335bfa))
* Add `commit_transactions` to the body of `/upsertAvalaraCredentials` endpoint ([2fd481c](https://github.com/Metronome-Industries/metronome-python/commit/2fd481ce87b8d0095b2a0be3594e60b01538c7e9))
* Add `seat_filter` field to creation request and response parameters of the alert object ([d70fc72](https://github.com/Metronome-Industries/metronome-python/commit/d70fc72c306c60c96561fedc6419ad358e06f66b))
* add quantity to plan pricing adjustment response ([4eb5277](https://github.com/Metronome-Industries/metronome-python/commit/4eb5277b78a7670da7215b4bc2a4808860176222))
* adds external_payment_id to ExternalInvoice ([35e26be](https://github.com/Metronome-Industries/metronome-python/commit/35e26be2ede51e494fd0f96ef6dda5754e9141eb))
* everything ([82c61e6](https://github.com/Metronome-Industries/metronome-python/commit/82c61e68a13f41209335e783d365a59ab951b981))
* GET-6845 get openapi specs ready for GA ([b5fb320](https://github.com/Metronome-Industries/metronome-python/commit/b5fb320ba619c3de5428f9c2e08b922766d0ffac))
* include aggregation BM info from searchEvents ([8fa8457](https://github.com/Metronome-Industries/metronome-python/commit/8fa84575cb6b097acc3ca1b5048ea9df5f66af53))
* ORCH-833/948/946/947 - updated the API to accept aws_customer_account_id all gated behind a feature flag ([31af8fd](https://github.com/Metronome-Industries/metronome-python/commit/31af8fdb88445e31c8bfc047d5aebe8ac28a784f))
* remove beta language, FF, stainless skip ([cc5e7ed](https://github.com/Metronome-Industries/metronome-python/commit/cc5e7ed287fc356246f15cc2ff590a5b57fcfe6d))
* Return values for set customer billing configuration endpoint ([b546ff5](https://github.com/Metronome-Industries/metronome-python/commit/b546ff55b1a81cff28f3e5e18a780dfc935c2fc1))
* update create alert api to allow LowRemainingSeatBalanceReached alert ([28bbf3e](https://github.com/Metronome-Industries/metronome-python/commit/28bbf3ec4e2299d5cb8e1e8faba92399b8b27a06))


### Bug Fixes

* compat with Python 3.14 ([d033920](https://github.com/Metronome-Industries/metronome-python/commit/d033920ce482641ec7c705a592e20629c18c720f))
* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([8748946](https://github.com/Metronome-Industries/metronome-python/commit/8748946083d6f8582dc5d91446952f2987fca3f4))
* ensure streams are always closed ([25c3ae8](https://github.com/Metronome-Industries/metronome-python/commit/25c3ae8b2e0b26e0c720736b0c5831f8d892ea84))
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([9231074](https://github.com/Metronome-Industries/metronome-python/commit/9231074106d4f8009dbfd7a0cc4cf76648a58f7d))
* use async_to_httpx_files in patch method ([d1b1be0](https://github.com/Metronome-Industries/metronome-python/commit/d1b1be0961af3e6d13c604f3ebca1573cd293a97))


### Chores

* add missing docstrings ([355fe47](https://github.com/Metronome-Industries/metronome-python/commit/355fe4740a7fc3ec4e608a1d2da0e7c8588b73ba))
* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([041a7d2](https://github.com/Metronome-Industries/metronome-python/commit/041a7d232490a1a9e9512f8ba43883f12f32eb19))
* **docs:** use environment variables for authentication in code snippets ([d7f37cd](https://github.com/Metronome-Industries/metronome-python/commit/d7f37cd1e1d26f3a1fff5cb39da8beb0b3f81df1))
* **internal:** add `--fix` argument to lint script ([39602a0](https://github.com/Metronome-Industries/metronome-python/commit/39602a0cd5cd28ca2784da697423fbda99a4bd41))
* **internal:** add missing files argument to base client ([0dd45c5](https://github.com/Metronome-Industries/metronome-python/commit/0dd45c5a13060fde96ffb7a2272001bcb6578736))
* **internal:** codegen related update ([00a67e8](https://github.com/Metronome-Industries/metronome-python/commit/00a67e8a38c5e470dec2221cc598eb677b2ae4ef))
* **internal:** codegen related update ([9014e90](https://github.com/Metronome-Industries/metronome-python/commit/9014e904870a05da89e2ef210117f70db746e864))
* **internal:** grammar fix (it's -> its) ([e844546](https://github.com/Metronome-Industries/metronome-python/commit/e8445469bd3c10da8a3c6d99b1e441866d3e1277))
* **package:** drop Python 3.8 support ([caf05b2](https://github.com/Metronome-Industries/metronome-python/commit/caf05b2f01f75a1364b9a4d00b7eff8d79e8b1f3))
* update lockfile ([27cc4f3](https://github.com/Metronome-Industries/metronome-python/commit/27cc4f3f43f10c15209cb69c547eabd46c9f1b16))


### Documentation

* document missing fields for schemas related to recurring credits and commits ([3ecb1d7](https://github.com/Metronome-Industries/metronome-python/commit/3ecb1d7544db26e955f1b08e3cb1675c0613108a))

## 3.1.0 (2025-10-31)

Full Changelog: [v3.0.0...v3.1.0](https://github.com/Metronome-Industries/metronome-python/compare/v3.0.0...v3.1.0)
Expand Down
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<!-- prettier-ignore -->
[![PyPI version](https://img.shields.io/pypi/v/metronome-sdk.svg?label=pypi%20(stable))](https://pypi.org/project/metronome-sdk/)

The Metronome Python library provides convenient access to the Metronome REST API from any Python 3.8+
The Metronome Python library provides convenient access to the Metronome REST API from any Python 3.9+
application. The library includes type definitions for all request params and response fields,
and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx).

Expand Down Expand Up @@ -103,14 +103,17 @@ pip install metronome-sdk[aiohttp]
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:

```python
import os
import asyncio
from metronome import DefaultAioHttpClient
from metronome import AsyncMetronome


async def main() -> None:
async with AsyncMetronome(
bearer_token="My Bearer Token",
bearer_token=os.environ.get(
"METRONOME_BEARER_TOKEN"
), # This is the default and can be omitted
http_client=DefaultAioHttpClient(),
) as client:
await client.v1.usage.ingest(
Expand Down Expand Up @@ -503,7 +506,7 @@ print(metronome.__version__)

## Requirements

Python 3.8 or higher.
Python 3.9 or higher.

## Contributing

Expand Down
3 changes: 2 additions & 1 deletion api.md
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ from metronome.types.v1 import (
CustomerListCostsResponse,
CustomerPreviewEventsResponse,
CustomerRetrieveBillingConfigurationsResponse,
CustomerSetBillingConfigurationsResponse,
CustomerSetNameResponse,
)
```
Expand All @@ -168,7 +169,7 @@ Methods:
- <code title="get /v1/customers/{customer_id}/costs">client.v1.customers.<a href="./src/metronome/resources/v1/customers/customers.py">list_costs</a>(\*, customer_id, \*\*<a href="src/metronome/types/v1/customer_list_costs_params.py">params</a>) -> <a href="./src/metronome/types/v1/customer_list_costs_response.py">SyncCursorPage[CustomerListCostsResponse]</a></code>
- <code title="post /v1/customers/{customer_id}/previewEvents">client.v1.customers.<a href="./src/metronome/resources/v1/customers/customers.py">preview_events</a>(\*, customer_id, \*\*<a href="src/metronome/types/v1/customer_preview_events_params.py">params</a>) -> <a href="./src/metronome/types/v1/customer_preview_events_response.py">CustomerPreviewEventsResponse</a></code>
- <code title="post /v1/getCustomerBillingProviderConfigurations">client.v1.customers.<a href="./src/metronome/resources/v1/customers/customers.py">retrieve_billing_configurations</a>(\*\*<a href="src/metronome/types/v1/customer_retrieve_billing_configurations_params.py">params</a>) -> <a href="./src/metronome/types/v1/customer_retrieve_billing_configurations_response.py">CustomerRetrieveBillingConfigurationsResponse</a></code>
- <code title="post /v1/setCustomerBillingProviderConfigurations">client.v1.customers.<a href="./src/metronome/resources/v1/customers/customers.py">set_billing_configurations</a>(\*\*<a href="src/metronome/types/v1/customer_set_billing_configurations_params.py">params</a>) -> None</code>
- <code title="post /v1/setCustomerBillingProviderConfigurations">client.v1.customers.<a href="./src/metronome/resources/v1/customers/customers.py">set_billing_configurations</a>(\*\*<a href="src/metronome/types/v1/customer_set_billing_configurations_params.py">params</a>) -> <a href="./src/metronome/types/v1/customer_set_billing_configurations_response.py">CustomerSetBillingConfigurationsResponse</a></code>
- <code title="post /v1/customers/{customer_id}/setIngestAliases">client.v1.customers.<a href="./src/metronome/resources/v1/customers/customers.py">set_ingest_aliases</a>(\*, customer_id, \*\*<a href="src/metronome/types/v1/customer_set_ingest_aliases_params.py">params</a>) -> None</code>
- <code title="post /v1/customers/{customer_id}/setName">client.v1.customers.<a href="./src/metronome/resources/v1/customers/customers.py">set_name</a>(\*, customer_id, \*\*<a href="src/metronome/types/v1/customer_set_name_params.py">params</a>) -> <a href="./src/metronome/types/v1/customer_set_name_response.py">CustomerSetNameResponse</a></code>
- <code title="post /v1/customers/{customer_id}/updateConfig">client.v1.customers.<a href="./src/metronome/resources/v1/customers/customers.py">update_config</a>(\*, customer_id, \*\*<a href="src/metronome/types/v1/customer_update_config_params.py">params</a>) -> None</code>
Expand Down
24 changes: 13 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
[project]
name = "metronome-sdk"
version = "3.1.0"
version = "3.2.0"
description = "The official Python library for the metronome API"
dynamic = ["readme"]
license = "Apache-2.0"
authors = [
{ name = "Metronome", email = "dev-feedback@metronome.com" },
]

dependencies = [
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
"httpx>=0.23.0, <1",
"pydantic>=1.9.0, <3",
"typing-extensions>=4.10, <5",
"anyio>=3.5.0, <5",
"distro>=1.7.0, <2",
"sniffio",
]
requires-python = ">= 3.8"

requires-python = ">= 3.9"
classifiers = [
"Typing :: Typed",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Operating System :: OS Independent",
"Operating System :: POSIX",
"Operating System :: MacOS",
Expand All @@ -46,7 +48,7 @@ managed = true
# version pins are in requirements-dev.lock
dev-dependencies = [
"pyright==1.1.399",
"mypy",
"mypy==1.17",
"respx",
"pytest",
"pytest-asyncio",
Expand Down Expand Up @@ -141,7 +143,7 @@ filterwarnings = [
# there are a couple of flags that are still disabled by
# default in strict mode as they are experimental and niche.
typeCheckingMode = "strict"
pythonVersion = "3.8"
pythonVersion = "3.9"

exclude = [
"_dev",
Expand Down
112 changes: 62 additions & 50 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,40 +12,45 @@
-e file:.
aiohappyeyeballs==2.6.1
# via aiohttp
aiohttp==3.12.8
aiohttp==3.13.2
# via httpx-aiohttp
# via metronome-sdk
aiosignal==1.3.2
aiosignal==1.4.0
# via aiohttp
annotated-types==0.6.0
annotated-types==0.7.0
# via pydantic
anyio==4.4.0
anyio==4.12.0
# via httpx
# via metronome-sdk
argcomplete==3.1.2
argcomplete==3.6.3
# via nox
async-timeout==5.0.1
# via aiohttp
attrs==25.3.0
attrs==25.4.0
# via aiohttp
certifi==2023.7.22
# via nox
backports-asyncio-runner==1.2.0
# via pytest-asyncio
certifi==2025.11.12
# via httpcore
# via httpx
colorlog==6.7.0
colorlog==6.10.1
# via nox
dependency-groups==1.3.1
# via nox
dirty-equals==0.6.0
distlib==0.3.7
dirty-equals==0.11
distlib==0.4.0
# via virtualenv
distro==1.8.0
distro==1.9.0
# via metronome-sdk
exceptiongroup==1.2.2
exceptiongroup==1.3.1
# via anyio
# via pytest
execnet==2.1.1
execnet==2.1.2
# via pytest-xdist
filelock==3.12.4
filelock==3.19.1
# via virtualenv
frozenlist==1.6.2
frozenlist==1.8.0
# via aiohttp
# via aiosignal
h11==0.16.0
Expand All @@ -58,80 +63,87 @@ httpx==0.28.1
# via respx
httpx-aiohttp==0.1.9
# via metronome-sdk
idna==3.4
humanize==4.13.0
# via nox
idna==3.11
# via anyio
# via httpx
# via yarl
importlib-metadata==7.0.0
iniconfig==2.0.0
importlib-metadata==8.7.0
iniconfig==2.1.0
# via pytest
markdown-it-py==3.0.0
# via rich
mdurl==0.1.2
# via markdown-it-py
multidict==6.4.4
multidict==6.7.0
# via aiohttp
# via yarl
mypy==1.14.1
mypy-extensions==1.0.0
mypy==1.17.0
mypy-extensions==1.1.0
# via mypy
nodeenv==1.8.0
nodeenv==1.9.1
# via pyright
nox==2023.4.22
packaging==23.2
nox==2025.11.12
packaging==25.0
# via dependency-groups
# via nox
# via pytest
platformdirs==3.11.0
pathspec==0.12.1
# via mypy
platformdirs==4.4.0
# via virtualenv
pluggy==1.5.0
pluggy==1.6.0
# via pytest
propcache==0.3.1
propcache==0.4.1
# via aiohttp
# via yarl
pydantic==2.11.9
pydantic==2.12.5
# via metronome-sdk
pydantic-core==2.33.2
pydantic-core==2.41.5
# via pydantic
pygments==2.18.0
pygments==2.19.2
# via pytest
# via rich
pyright==1.1.399
pytest==8.3.3
pytest==8.4.2
# via pytest-asyncio
# via pytest-xdist
pytest-asyncio==0.24.0
pytest-xdist==3.7.0
python-dateutil==2.8.2
pytest-asyncio==1.2.0
pytest-xdist==3.8.0
python-dateutil==2.9.0.post0
# via time-machine
pytz==2023.3.post1
# via dirty-equals
respx==0.22.0
rich==13.7.1
ruff==0.9.4
setuptools==68.2.2
# via nodeenv
six==1.16.0
rich==14.2.0
ruff==0.14.7
six==1.17.0
# via python-dateutil
sniffio==1.3.0
# via anyio
sniffio==1.3.1
# via metronome-sdk
time-machine==2.9.0
tomli==2.0.2
time-machine==2.19.0
tomli==2.3.0
# via dependency-groups
# via mypy
# via nox
# via pytest
typing-extensions==4.12.2
typing-extensions==4.15.0
# via aiosignal
# via anyio
# via exceptiongroup
# via metronome-sdk
# via multidict
# via mypy
# via pydantic
# via pydantic-core
# via pyright
# via pytest-asyncio
# via typing-inspection
typing-inspection==0.4.1
# via virtualenv
typing-inspection==0.4.2
# via pydantic
virtualenv==20.24.5
virtualenv==20.35.4
# via nox
yarl==1.20.0
yarl==1.22.0
# via aiohttp
zipp==3.17.0
zipp==3.23.0
# via importlib-metadata
Loading