skillfed

py-moneyed

Provides Currency and Money classes for use in your Python code.

py-moneyed v3.0 1.1M downloads/30d#4,299 on PyPI473
Permissive license BSD DORMANT released

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-moneyed

uv

uv add py-moneyed

poetry

poetry add py-moneyed

Installing 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

Development Status :: 6 - MatureEnvironment :: Other EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Office/Business :: FinancialTopic :: Software Development :: Libraries :: Python Modules

Tags

money and currency classesfinancial arithmetic pythondecimal money handlingcurrency representationmonetary value abstraction
financial-datacurrency-handling

More Python Modules packages