py-moneyed
Provides Currency and Money classes for use in your Python code.
What it is and what it does
py-moneyed provides Money and Currency classes as a safer, more semantically correct way to handle monetary values in Python code. Instead of using floats (which suffer from precision errors) or raw Decimal objects (which lack currency context), you create Money instances tied to a specific currency and perform arithmetic on them as if they were numbers. The package depends on babel for localization and typing-extensions for type hints, and supports Python 3.7 through 3.11.
The package is designed to be used directly in financial and economics software, or subclassed for domain-specific extensions. It has been stable since its early releases and is classified as Mature, though development has been dormant since late 2022. With significant monthly downloads, it is a widely adopted solution for this problem in the Python ecosystem.
Use it for:
- Build financial applications that need to track money amounts with explicit currency types and avoid float precision errors
- Implement e-commerce systems where prices, totals, and transactions must preserve currency context
- Create accounting or bookkeeping tools that require correct arithmetic on monetary values across different currencies
- Develop APIs that serialize and deserialize monetary values with currency information intact
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Money and Currency classes for representing monetary values in Python with proper arithmetic and currency handling, avoiding pitfalls of using floats or raw Decimal objects.
Yes. The package solves a real problem (safe monetary representation) with a mature, stable API and low install friction. Dormant maintenance is a minor concern for a library this simple and well-established, but the lack of recent activity means you should verify that its currency support and arithmetic operations meet your specific needs before committing to it in new projects.
Install
py-moneyed on PyPI
pip
pip install py-moneyeduv
uv add py-moneyedpoetry
poetry add py-moneyedInstalling py-moneyed
Before you install
Low install friction with only two lightweight runtime dependencies (babel and typing-extensions). Maintenance is dormant—last release was in 2022 and no commits since April 2024—but the package is classified as Mature and has been stable since its early releases.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install py-moneyed
from moneyed import Money, USD
five_dollars = Money(5, USD)
Verify before relying
- Whether the package handles currency conversion or only represents fixed-currency amounts
- What arithmetic operations (addition, subtraction, multiplication) are supported between Money objects
- Whether the package provides exchange rate data or requires external sources
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — babel, typing-extensions |
| Maintenance | dormant — 1,356 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,146,230/month — #4,299 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: py_moneyed-3.0-py3-none-any.whl
Keywords: money, currency, class, abstraction
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
django-moneyAdds Money and currency field types to Django…
permissive · top 5,000 on PyPI
py-moneyRepresents monetary amounts with currency-aware…
permissive · top 15,000 on PyPI
pricesHandles monetary amounts with currency…
permissive · top 15,000 on PyPI
forex-pythonFetches current and historical foreign exchange…
permissive · top 15,000 on PyPI
CurrencyConverterConverts currency amounts using historical…
unclear · top 15,000 on PyPI
iso4217Provides ISO 4217 currency data as a Python…
permissive · top 15,000 on PyPI
ccyProvides a dictionary of currency objects with…
permissive · top 15,000 on PyPI
currency-symbolsMaps ISO 4217 currency codes to their symbols…
permissive · top 5,000 on PyPI
price-parserExtracts price amounts and currency symbols…
permissive · top 5,000 on PyPI
roundersProvides drop-in replacements for Python's…
permissive · top 15,000 on PyPI