--- id: prices version: "1.1.1" license: BSD license_treatment: permissive maintenance: aging --- # prices — Python price handling for humans License: permissive · Maintenance: aging · Downloads: 97.7K/mo ## 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 above — 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 pip install prices uv add prices 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: unspecified - Install friction: low - Maintenance: aging - Downloads: 97.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags python money handling, currency arithmetic, taxed price calculations, multi-currency support, price range management, tax-aware money objects, decimal currency math, currency-handling, financial-math, type-safe [View on SkillFed](https://skillfed.io/packages/prices) · [View on PyPI](https://pypi.org/project/prices/)