--- id: py-money version: "0.5.0" license: MIT license_treatment: permissive maintenance: abandoned --- # py-money — Money module for python License: permissive · Maintenance: abandoned · Downloads: 808.9K/mo ## What it is and what it does py-money is a Money class for Python that enforces correct decimal representation for each currency—so 3.678 USD or 5.5 JPY are rejected as invalid. It wraps amounts as immutable objects tied to a specific Currency, supporting arithmetic (addition, division, multiplication) and comparison operators with automatic rounding to the currency's correct precision after each operation. The library depends on babel for locale-aware formatting. The package is designed for straightforward monetary calculations: online stores computing sales tax, multi-currency pricing, and locale-specific display. It explicitly does not support currency conversion or operations requiring arbitrary precision beyond what the currency defines. Rounding happens after each operation, which is correct for retail math but can produce unexpected results if expressions are reordered—the documentation warns against this. Use it for: - Computing sales tax and totals in an online store across multiple currencies with correct rounding. - Formatting prices for display in different locales (e.g., '$3.24' for en_US, '€5.56' for en_UK). - Validating that monetary amounts conform to their currency's decimal precision before storage or transmission. - Performing basic arithmetic on money objects (addition, division, multiplication) with automatic rounding per currency rules. - Preventing accidental cross-currency operations by raising errors when mixing currencies in calculations. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Represents monetary amounts with currency-aware precision, enforcing correct decimal places per currency and supporting arithmetic operations, comparisons, and locale-specific formatting. No. While the package is lightweight and permissively licensed, it has been abandoned since 2020 with no maintenance for over 4 years. For new projects, choose an actively maintained alternative. For existing codebases already using py-money, it may continue to work if your Python version and babel compatibility remain stable, but you have no path to fixes or support. ## Install pip install py-money uv add py-money poetry add py-money ## Installing py-money Before you install: Low install friction with a single runtime dependency (babel). However, the package is abandoned—last release was 2020-01-29 and last commit 2022-04-12—so expect no maintenance, bug fixes, or updates. License in practice: MIT license (permissive) allows commercial and private use with minimal restrictions, making it safe to adopt from a licensing perspective. Quickstart: pip install py-money from money.money import Money from money.currency import Currency m = Money('9.95', Currency.USD) print(m.format('en_US')) # '$9.95' Verify before relying: - Whether the package works correctly with modern Python versions beyond what the fact sheet specifies - Whether babel's evolution since 2020 has introduced compatibility issues with py-money - Real-world performance or correctness issues in production use since abandonment ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 808.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags money arithmetic python, currency decimal precision, multi-currency formatting, money class immutable, locale money formatting, currency rounding, monetary calculations, money-handling, currency-formatting, abandoned [View on SkillFed](https://skillfed.io/packages/py-money) · [View on PyPI](https://pypi.org/project/py-money/)