prices
Python price handling for humans
What it is and what it does
Prices is a Python library for working with monetary amounts in a type-safe way. It provides Money objects that carry both a numeric value (as Decimal) and a currency code, TaxedMoney objects that track net and gross amounts separately, and TaxedMoneyRange for price bands. The library's core strength is preventing common mistakes: you cannot compare Money in different currencies, add amounts across currencies, or mix currencies in ranges—operations that would silently produce nonsense in naive implementations.
The library depends on babel and typing. It includes quantization methods to format amounts according to currency conventions (e.g., JPY to no decimals, EUR to two), and a flat_tax function to apply tax rates. The design is straightforward: create Money or TaxedMoney instances, perform arithmetic, and call quantize() when you need formatted output. It's a focused layer for e-commerce backends, invoicing systems, and any code that needs to reason about prices across multiple currencies.
Use it for:
- E-commerce checkout systems that calculate net and gross prices with tax applied across multiple currencies.
- Invoicing and billing software that must prevent accidental currency mixing in calculations.
- Price range displays in product catalogs where you need to show min/max with tax included.
- Financial reporting that requires precise decimal arithmetic and currency-aware quantization.
- Multi-tenant platforms handling customer payments in different currencies.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Handles monetary amounts with currency awareness, tax calculations, and price ranges while preventing invalid operations like comparing or adding different currencies.
Yes, if you need currency-aware money arithmetic with built-in safeguards. Low install friction and permissive BSD license make it a safe add. However, aging maintenance (last release 2022-10-07, no recent commits) means you should verify it works with your Python version. For new projects, evaluate whether a more actively maintained alternative exists; for existing codebases already using it, it remains stable.
Install
prices on PyPI
pip
pip install pricesuv
uv add pricespoetry
poetry add pricesInstalling prices
Before you install
Low friction: pure Python wheel with only babel and typing as runtime dependencies. Aging maintenance status—last release was 2022-10-07 with no recent activity, though repository remains active with 267 stars.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions, suitable for most projects.
Quickstart
from prices import Money, TaxedMoney
a = Money(10, 'USD')
a += Money(20, 'USD')
p = TaxedMoney(net=Money(20, 'EUR'), gross=Money(30, 'EUR'))
p.tax
Verify before relying
- Whether the package works reliably with Python versions beyond 3.8, given aging maintenance and unspecified python_support.
- Performance characteristics when handling large price ranges or high-frequency calculations.
- Whether tax calculation methods beyond flat_tax are available or documented.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — babel, typing |
| Maintenance | aging — 1,407 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 97,678/month — #13,134 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: prices-1.1.1-py3-none-any.whl
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
price-parserExtracts price amounts and currency symbols…
permissive · top 5,000 on PyPI
py-moneyRepresents monetary amounts with currency-aware…
permissive · top 15,000 on PyPI
forex-pythonFetches current and historical foreign exchange…
permissive · top 15,000 on PyPI
py-moneyedProvides Money and Currency classes for…
permissive · top 5,000 on PyPI
django-moneyAdds Money and currency field types to Django…
permissive · top 5,000 on PyPI
vat-utilsProvides Python utilities for VAT (Value Added…
unclear · top 15,000 on PyPI
cpiAdjusts U.S. dollar amounts for inflation using…
permissive · top 15,000 on PyPI
CurrencyConverterConverts currency amounts using historical…
unclear · top 15,000 on PyPI
currency-symbolsMaps ISO 4217 currency codes to their symbols…
permissive · top 5,000 on PyPI
python-rangesProvides Range, RangeSet, and RangeDict data…
permissive · top 15,000 on PyPI