Skip to main content

Money-Py3: Modern Python Money Library

A modern Python 3.9+ money handling library with currency exchange support and optional locale-aware formatting.

This is a modernized fork of the original money package by Carlos Palol, completely rewritten for Python 3.9+ with all Python 2 compatibility code removed.

Features

  • Python 3.9+ only - Modern, clean codebase
  • Decimal precision - No floating-point arithmetic errors
  • Currency exchange - Extensible exchange rate backends
  • Locale-aware formatting - Optional CLDR formatting via Babel
  • Immutable objects - Thread-safe money objects
  • Type hints ready - Modern Python development

Installation

Using pip:

pip install money-py3

For locale-aware formatting support:

pip install money-py3[formatting]

Using Poetry:

poetry add money-py3

For locale-aware formatting support:

poetry add money-py3[formatting]

Quick Start

from money import Money, XMoney, xrates
from money.exchange import SimpleBackend
from decimal import Decimal

# Basic usage
price = Money('10.50', 'USD')
tax = Money('0.98', 'USD')
total = price + tax
print(total)  # USD 11.48

# Currency exchange
xrates.install(SimpleBackend)
xrates.base = 'USD'
xrates.setrate('EUR', Decimal('0.85'))

eur_total = total.to('EUR')
print(eur_total)  # EUR 9.76

# XMoney with automatic conversion
x1 = XMoney('10', 'USD')
x2 = XMoney('5', 'EUR')  
result = x1 + x2  # Automatically converts EUR to USD
print(result)  # USD 15.88

Requirements

  • Python 3.9+
  • packaging (automatically installed)
  • babel (optional, for formatting)

License

MIT License - see original project for details.

Credits

This package is based on the original money library by Carlos Palol (carlos.palol@awarepixel.com), modernized for Python 3.9+.

Original Project

Modernization by Fever

This modernized version is maintained by Fever (https://github.com/feverup/).

Changes made:

  • Removed all Python 2 compatibility code (six library)
  • Updated to use modern Python 3.9+ features
  • Replaced deprecated imports with current alternatives
  • Improved packaging configuration
  • Updated dependencies to current versions

Contact: engineering@feverup.com

Metadata

Release files for money-py3 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for money-py3 2.0.0
File Size Uploaded
money_py3-2.0.0.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for money-py3 2.0.0
File Interpreter ABI Platform
money_py3-2.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.5 kB

Release files / money_py3-2.0.0.tar.gz

Download URL money_py3-2.0.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
bc5a22badf6154b6957b0016bb8721d5034422ea7e968b5f52156cde21d23f3e
BLAKE2b-256 checksum
How to use checksums
f6644f9f91b86540f93f0d31e22b057fd7ebe41d35a84fe539f166b4e80d8e02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

Release files / money_py3-2.0.0-py3-none-any.whl

Download URL money_py3-2.0.0-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e15b2e92f3f1ca4aafb83a992ddb7cb17b98a00919a51a6f37f85d918a0a892b
BLAKE2b-256 checksum
How to use checksums
97cd7fcbdb7f6c12ff497fd7cb3d32145a71b955ea938235baa8f8784ebe00bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.11.13 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page