skillfed

py-money

Money module for python

py-money v0.5.0 808.9K downloads/30d#5,011 on PyPI127
Permissive license MIT Abandoned released

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 on this page — 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

py-money on PyPI

pip

pip install py-money

uv

uv add py-money

poetry

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 not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — babel
Maintenance abandoned — 2,389 days since the last release
Last repo commit
First released
Downloads 808,931/month — #5,011 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: py_money-0.5.0-py3-none-any.whl

Keywords: money, currency

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3

Tags

money arithmetic pythoncurrency decimal precisionmulti-currency formattingmoney class immutablelocale money formattingcurrency roundingmonetary calculations
money-handlingcurrency-formattingabandoned

More Utilities packages