skillfed

prices

Python price handling for humans

prices v1.1.1 97.7K downloads/30d#13,134 on PyPI267
Permissive license BSD AGING released

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 prices

uv

uv add prices

poetry

poetry add prices

Installing 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

Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Topic :: Software Development :: Libraries :: Python Modules

Tags

python money handlingcurrency arithmetictaxed price calculationsmulti-currency supportprice range managementtax-aware money objectsdecimal currency math
currency-handlingfinancial-mathtype-safe

More Python Modules packages