Money & Payments · zero-dependency · MIT

larzfx

Currency conversion with a settable rate table.

Works fully offline - set your own rates (fetched from a real FX API via the http package if you want, kept deliberately out of this package to stay dependency-free). Note: the language's Money type isn't currency-tagged, it's just cents - convert() returns a Money value scaled by the rate, it doesn't attach a currency label.

larzscript pkg install fx
View on GitHub →Learn the stack

What you get

Try it

import "fx" as fx
fx.set_rate("USD", "NGN", 1550.0)
print(fx.convert($10.00, "USD", "NGN"))
print(fx.rate("NGN", "USD"))
Output
$15500.00
0.000645161

Why it's in the Larz Stack

larzfx is a real Larzscript package (larzscript pkg install fx) - 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.