modern-treasury
The official Python library for the Modern Treasury API
Decision gist · record as of 2026-08-14
Yes. This is the official SDK for Modern Treasury's API, actively maintained with no known vulnerabilities, low install friction, and permissive licensing. Install it if you need to integrate with Modern Treasury in Python 3.9+. The typed interface and async support make it suitable for both simple scripts and production services.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later; API credentials (organization_id and api_key) must be set via environment variables.
- Low friction: pure Python wheel with six common dependencies (httpx, pydantic, anyio, distro, sniffio, typing-extensions).
- Actively maintained—last commit 2026-08-13, released 2026-07-27, no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license (permissive): you can use, modify, and distribute this library freely in commercial and private projects, with minimal restrictions.
last release 2026-07-27 (18 days) · last repo commit 2026-08-13 · 49 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 635,814 downloads/mo, #5,633 on PyPI
Alternatives
Verify before relying
pip install modern-treasury
import os
from modern_treasury import ModernTreasury
client = ModernTreasury(
organization_id=os.environ.get("MODERN_TREASURY_ORGANIZATION_ID"),
api_key=os.environ.get("MODERN_TREASURY_API_KEY"),
)
counterparty = client.counterparties.create(name="my first counterparty")
print(counterparty.id)- Whether aiohttp backend option (mentioned in docs) is included in the base install or requires a separate extra.
- Rate limiting and retry behavior specifics beyond the error types documented.
- File upload streaming behavior and memory footprint for large files.
What it is and what it does
Modern Treasury is the official Python SDK for the Modern Treasury REST API, a financial operations platform. It wraps HTTP calls to manage counterparties, external accounts, payments, and other treasury functions, offering both sync and async clients powered by httpx. The library includes full type hints (TypedDict for requests, Pydantic models for responses) and auto-paginating iterators for list endpoints, so you can work with typed data and let the SDK handle pagination automatically.
The package is designed for Python 3.9+ applications that need to integrate with Modern Treasury's API. It requires credentials (organization_id and api_key) passed as environment variables or constructor arguments. Dependencies are lightweight and standard (httpx for HTTP, pydantic for validation, anyio and sniffio for async support). The library handles error cases with specific exception types (APIConnectionError, RateLimitError, APIStatusError) and supports file uploads via bytes or PathLike objects.
Use it for
- Create and manage counterparties (vendors, customers) in a financial system programmatically.
- Build async payment processing workflows that fetch and process paginated lists of transactions.
- Integrate treasury operations (external accounts, payments) into a Python web application or backend service.
- Automate document uploads associated with financial entities using the file upload interface.
- Handle API errors gracefully with typed exception classes for connection, rate limit, and status errors.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is the official SDK for Modern Treasury's API, actively maintained with no known vulnerabilities, low install friction, and permissive licensing. Install it if you need to integrate with Modern Treasury in Python 3.9+. The typed interface and async support make it suitable for both simple scripts and production services.
Install
modern-treasury on PyPI
Before you install
Low friction: pure Python wheel with six common dependencies (httpx, pydantic, anyio, distro, sniffio, typing-extensions). Actively maintained—last commit 2026-08-13, released 2026-07-27, no known vulnerabilities.
Requires Python 3.9 or later; API credentials (organization_id and api_key) must be set via environment variables.
License in practice
MIT license (permissive): you can use, modify, and distribute this library freely in commercial and private projects, with minimal restrictions.
Quickstart
pip install modern-treasury
import os
from modern_treasury import ModernTreasury
client = ModernTreasury(
organization_id=os.environ.get("MODERN_TREASURY_ORGANIZATION_ID"),
api_key=os.environ.get("MODERN_TREASURY_API_KEY"),
)
counterparty = client.counterparties.create(name="my first counterparty")
print(counterparty.id)
Verify before relying
- Whether aiohttp backend option (mentioned in docs) is included in the base install or requires a separate extra.
- Rate limiting and retry behavior specifics beyond the error types documented.
- File upload streaming behavior and memory footprint for large files.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesanyiodistrohttpxpydanticsniffiotyping-extensions |
| Maintenance | Actively maintained 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 635,814 / month, #5,633 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 :: MIT 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: modern_treasury-1.79.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 › “modern treasury api client”
- modern-treasuryProvides a typed Python client library for the Modern Treasury REST…
- openbb-government-usIntegrates US Government data sources (commodity reports, weather,…
- openbb-federal-reserveIntegrates Federal Reserve data sources into the OpenBB Platform,…
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 metronome-sdk · openlayer · dodopayments · conductor-py · lithic · telnyx · letta-client · composio-client · prelude-python-sdk · orb-billing