Money & Payments ยท zero-dependency ยท MIT

larzcurrency

Format and parse money for humans, per locale.

Locale-aware money display and parsing from a compact built-in table - no locale module or babel. Handles the details others miss: Indian lakh grouping, Swiss apostrophes, the German separator swap, symbol-after placement, correct minor-unit digits per currency, and parenthesised negatives.

larzscript pkg install currency
View on GitHub →Learn the stack

What you get

Try it

import "currency" as currency
print(currency.format(123456789, "USD"))
print(currency.format(123456789, "INR"))
print(currency.format(500, "JPY"))
print(currency.parse("$1,234,567.89", "USD"))
Output
$1,234,567.89
โ‚น12,34,567.89
ยฅ500
123456789

Why it's in the Larz Stack

larzcurrency is a real Larzscript package (larzscript pkg install currency) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.