Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

multicurrency

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

multicurrency

Currency representation library.

  • 2.1.0
  • Source
  • PyPI
  • Socket score

Maintainers
1

multicurrency

Currency representation.

Synopsis

The multicurrency module provides support for currency operations. It supports several different currencies.

The currencies supported by this module were created with information (alphabetic code, numeric code, and minor unit size) from ISO-4217.

Prerequisites

Python, version 3.6 or above, needs to be installed on your local computer. Python setup can be found here.

Installation

The simplest way to install this library is using pip:

pip3 install multicurrency

Documentation

Full module documentation can be found here.

Usage

Simple usage example:

>>> from multicurrency import Euro
>>> euro = Euro(1000)
>>> print(euro)
1.000,00 €
>>> print(euro + Euro(0.50))
1.000,50 €

Unsupported currencies can be represented by creating a generic Currency object with the desired settings.

>>> from multicurrency import Currency
>>> bitcoin = Currency(
...     amount=1000,
...     alpha_code='XBT',
...     numeric_code='0',
...     symbol='₿',
...     localized_symbol='₿',
...     convertion='',
...     pattern='8.,3%-%s%u')
>>> print(bitcoin)
₿1,000.00000000

To help working with unsupported currencies the settings can be defined in a dictionary and used when needed:

>>> from multicurrency import Currency
>>> settings = {
...     'alpha_code':'XBT',
...     'numeric_code':'0',
...     'symbol':'₿',
...     'localized_symbol':'₿',
...     'convertion':'',
...     'pattern':'8.,3%-%s%u'}
>>> bitcoin = Currency(1000, **settings)
>>> print(bitcoin)
₿1,000.00000000

Currencies can also be represented with the ISO 4217 three-letter code instead of the symbol.

>>> from multicurrency import Euro
>>> euro = Euro(1000)
>>> print(euro.international())
1,000.00 EUR

Localization

The multicurrency library allows you to obtain a localized version of the currency representation:

>>> from multicurrency import TaiwanDollar, USDollar
>>> tw_dollar = TaiwanDollar('27.65')
>>> us_dollar = USDollar('1')
>>> print(us_dollar.localized(), '=', tw_dollar.localized())
US$1.00 = TW$27.65

Precision

The multicurrency library uses decimal.Decimal (to represent the amount value) which has a user alterable precision and rounding settings (defaulting to 28 places and ROUND_HALF_EVEN respectively).

To change the default precision value of a currency one can simply use the precision method provided by that currency (up to the value of the decimal.Decimal precision minus 3):

>>> from multicurrency import Euro
>>> for precision in [-1, 0, 1, 2, 3, 4, 5, 6, 25]:
...     result = Euro(1_000/7)
...     print(result.precision(precision))
143 €
143 €
142,9 €
142,86 €
142,857 €
142,8571 €
142,85714 €
142,857143 €
142,8571428571428612031013472 €

If a larger precision is required the default decimal.Context precision value will have to be changed:

>>> from decimal import localcontext
>>> from multicurrency import Euro
>>> with localcontext() as context:
...     precision = 50
...     context.prec = precision + 3
...     result = Euro(1_000/7)
...     print(result.precision(50))
142,85714285714286120310134720057249069213867187500000 €

To change the rounding method the default decimal.Context rounding value needs to be changed:

>>> from decimal import localcontext
>>> from multicurrency import Euro
>>> with localcontext() as context:
...     for rounding in [
...             'ROUND_CEILING',
...             'ROUND_DOWN',
...             'ROUND_FLOOR',
...             'ROUND_HALF_DOWN',
...             'ROUND_HALF_EVEN',
...             'ROUND_HALF_UP',
...             'ROUND_UP',
...             'ROUND_05UP']:
...         context.rounding = rounding
...         result = Euro(1_000/7)
...         print(f'{rounding:16}', result.precision(3))
ROUND_CEILING    142,858 €
ROUND_DOWN       142,857 €
ROUND_FLOOR      142,857 €
ROUND_HALF_DOWN  142,857 €
ROUND_HALF_EVEN  142,857 €
ROUND_HALF_UP    142,857 €
ROUND_UP         142,858 €
ROUND_05UP       142,857 €

Formatting

The Currency class allows you to create and customize your own value formatting behaviors using the same implementation as the built-in format() method.

The specification for the formatting feature is as follows:

[dp][ds][gs][gp][format]

The meaning of the various alignment options is as follows:

OptionTypeMeaning
[dp]int+The number of decimal places (integer number with one or more digits). Must be grater or equal to 0 (zero.)
[ds]char{1}The decimal sign (single non-digit character).
[gs]char{1}The grouping sign (single non-digit character).
[gp]int+The number of digits to group the number by (integer number with one or more digits).Must be grater or equal to 0 (zero.)
[format]strThe formatting pattern (a string with the order of the currency parts).

All fields are optional although for the first four fields when setting one the fields on the left of that are required to be set as well.

The available string currency parts for [format] are:

PartMeaning
%aThe currency's amount as seen in the default representation of the currency (the numeral system of the currency's country).
%AThe currency's amount in (western) arabic numerals.
%cThe currency's alpha code (as seen on the international representation of the currency).
%sThe currency's symbol.
%SThe currency's localized symbol.
%uThe currency's unsign amount as seen in the default representation of the currency (the numeral system of the currency's country).
%UThe currency's unsign amount in (western) arabic numerals.
%-The currency's amount sign.
%%The % symbol.

Basic examples of how to use the Currency formatting feature:

# Using the built-in `format()` method
>>> from multicurrency import Euro
>>> euro = Euro(1000000*(1/7))
>>> format(euro, '4%a')
'142.857,1429'
# Using the `'new' string` formating method
>>> from multicurrency import Euro
>>> euro = Euro(1000000*(1/7))
>>> '{:4%a}'.format(euro)
'142.857,1429'
# Using the `f-string` method
>>> from multicurrency import Euro
>>> euro = Euro(1000000*(1/7))
>>> f'{euro:4%a}'
'142.857,1429'

Some more examples of the Currency formatting feature usage (using the f-string method):

>>> from multicurrency import Euro
>>> euro = Euro(1000000*(1/7))
>>> print(euro)
142.857,14 €

>>> print(f'{euro}')
142.857,14 €

>>> print(f'{euro:_}')
142.857_14 €

>>> print(f'{euro:.,}')
142,857.14 €

>>> print(f'{euro:4.,}')
142,857.1429 €

>>> print(f'{euro:4.,2}')
14,28,57.1429 €

>>> print(f'{euro:_2}')
14.28.57_14 €

>>> print(f'{euro:.,2}')
14,28,57.14 €

>>> print(f'{euro:3%a}')
142.857,143

>>> print(f'{euro:3_%a}')
142.857_143

>>> print(f'{euro:3#_%a}')
142_857#143

>>> print(f'{euro:3.,2%a}')
14,28,57.143

>>> print(f'{euro:3.,4%a}')
14,2857.143

>>> print(f'{euro:.,4%a}')
14,2857.14

>>> print(f'{euro:%a}')
142.857,14

>>> print(f'{euro:%a\u00A0%c}')
142.857,14 EUR

>>> print(f'{euro:%a %c}')
142.857,14 EUR

Operations

Several operations are supported by the several library classes.

  • Absolute

    Produces the absolute value of a given currency.

    >>> from multicurrency import Euro
    >>> euro = abs(Euro(-2))
    >>> print(euro)
    2,00 €
    
  • Addiction

    Addiction is supported only between currencies of the same type.

    >>> from multicurrency import Euro
    >>> euro1 = Euro(2.5)
    >>> euro2 = Euro(3)
    >>> print(euro1 + euro2)
    5,50 €
    
  • Boolean

    Produces 'True' for values of currency other than zero. 'False' otherwise.

    >>> from multicurrency import Euro
    >>> bool(Euro(0))
    False
    >>> bool(Euro(1))
    True
    
  • Ceiling

    Produces a new currency rounded up to the nearest integer.

    >>> from multicurrency import Euro
    >>> from math import ceil
    >>> print(ceil(Euro(1/7)))
    1,00 €
    
  • Copy

    Produces a copy of itself.

    >>> from multicurrency import Euro
    >>> from copy import copy
    >>> euro = copy(Euro(1/7))
    >>> print(euro)
    0,14 €
    
  • Division

    Produces a new currency with the value of the division of the currency by either an int, float, or Decimal.

    >>> from multicurrency import Euro
    >>> euro = Euro(7) / 2
    >>> print(euro)
    3,50 €
    
  • Divmod

    Produces a tuple consisting of the currencies with the quotient and the remainder of the division of the currency by either an int, float, or Decimal.

    >>> from multicurrency import Euro
    >>> q, r = divmod(Euro(7), 2)
    >>> print(q, r)
    3,00 € 1,00 €
    
  • Float

    Produces a float with the value of the currency amount.

    >>> from multicurrency import Euro
    >>> float(Euro(1/7))
    0.14285714285714285
    
  • Flooring

    Produces a new currency rounded down to the nearest integer.

    >>> from multicurrency import Euro
    >>> from math import floor
    >>> print(floor(Euro(7/2)))
    3,00 €
    
  • Floordiv

    Produces a new currency with the integral part of the quotient of the division of the currency by either an int, float, or Decimal.

    >>> from multicurrency import Euro
    >>> q = Euro(7) // 2
    >>> print(q)
    €3,00
    
  • Hash

    Produces a hash representation of the Currency.

    >>> from multicurrency import Euro
    >>> hash(Euro(7))
    1166476495300974230
    
  • Int

    Produces an int with the value of the currency amount.

    >>> from multicurrency import Euro
    >>> int(Euro(7/2))
    3
    
  • Mod

    Produces a new currency with the value of the remainder of the division of the currency by either an int, float, or Decimal.

    >>> from multicurrency import Euro
    >>> r = Euro(7) % 2
    >>> print(r)
    1,00 €
    
  • Multiplication

    Multiplication is supported only between a currency and an int, float, or Decimal.

    >>> from multicurrency import Euro
    >>> print(Euro(2) * 2.5)
    5,00 €
    
  • Round

    Produces a new currency with the amount of the currency rounded to a given precision.

    >>> from multicurrency import Euro
    >>> r = round(Euro(1/7), 3)
    >>> print(r.amount)
    0.143
    
  • Subtraction

    Subtraction is supported only between currencies of the same type.

    >>> from multicurrency import Euro
    >>> euro1 = Euro(2)
    >>> euro2 = Euro(3)
    >>> print(euro1 - euro2)
    -1,00 €
    
  • Other Operations

    This library also supports the basic comparison operations between two objects of the same currency.

    >>> from multicurrency import Euro
    >>> euro1 = Euro(2)
    >>> euro2 = Euro(3)
    >>> euro1 > euro2
    False
    >>> euro1 >= euro2
    False
    >>> euro1 < euro2
    True
    >>> euro1 <= euro2
    True
    >>> euro1 == euro2
    False
    >>> euro1 != euro2
    True
    

Supported Currencies

Table of supported currencies (and default format):

CurrencyCountryDefaultLocalizedInternational
multicurrency.currencies.afghani.AfghaniAfghanistan؋ ۱۲۳٬۴۵۶٫۷۹؋ ۱۲۳٬۴۵۶٫۷۹123,456.79 AFN
multicurrency.currencies.dinar.AlgerianDinarAlgeria123.456,79 د.ج.123.456,79 د.ج.123,456.79 DZD
multicurrency.currencies.peso.ArgentinePesoArgentina$ 123.456,79AR$ 123.456,79123,456.79 ARS
multicurrency.currencies.dram.ArmenianDramArmenia123 456,79 Դ123 456,79 Դ123,456.79 AMD
multicurrency.currencies.florin.ArubanFlorinArubaƒ123,456.79ƒ123,456.79123,456.79 AWG
multicurrency.currencies.dollar.AustralianDollarAustralia$ 123,456.79$ 123,456.79123,456.79 AUD
multicurrency.currencies.dollar.AustralianDollarAUAustralia$123,456.79AU$123,456.79123,456.79 AUD
multicurrency.currencies.dollar.AustralianDollarCCCoconut Islands$123,456.79CC$123,456.79123,456.79 AUD
multicurrency.currencies.dollar.AustralianDollarKIKiribati$123,456.79KI$123,456.79123,456.79 AUD
multicurrency.currencies.dollar.AustralianDollarMRNauru$123,456.79NR$123,456.79123,456.79 AUD
multicurrency.currencies.dollar.AustralianDollarTVTuvalu$123,456.79TV$123,456.79123,456.79 AUD
multicurrency.currencies.manat.AzerbaijanianManatAzerbaijan123.456,79 ₼123.456,79 ₼123,456.79 AZN
multicurrency.currencies.dollar.BahamianDollarBahamas$123,456.79BS$123,456.79123,456.79 BSD
multicurrency.currencies.dinar.BahrainiDinarBahrainد.ب. ١٢٣٬٤٥٦٫٧٨٩د.ب. ١٢٣٬٤٥٦٫٧٨٩123,456.789 BHD
multicurrency.currencies.baht.BahtThailand฿123,456.79฿123,456.79123,456.79 THB
multicurrency.currencies.balboa.BalboaPanamaB/. 123,456.79B/. 123,456.79123,456.79 PAB
multicurrency.currencies.dollar.BarbadosDollarBarbados$123,456.79BB$123,456.79123,456.79 BBD
multicurrency.currencies.ruble.BelarusianRubleBelarus123 456,79 Br123 456,79 Br123,456.79 BYN
multicurrency.currencies.dollar.BelizeDollarBelize$123,456.79BZ$123,456.79123,456.79 BZD
multicurrency.currencies.dollar.BermudianDollarBermuda$123,456.79BM$123,456.79123,456.79 BMD
multicurrency.currencies.fuerte.BolivarFuerteVenezuelaBs.F. 123.456,79Bs.F. 123.456,79123,456.79 VEF
multicurrency.currencies.boliviano.BolivianoBoliviaBs. 123.456,79Bs. 123.456,79123,456.79 BOB
multicurrency.currencies.real.BrazilianRealBrazilR$ 123.456,79R$ 123.456,79123,456.79 BRL
multicurrency.currencies.dollar.BruneiDollarBrunei$ 123.456,79$ 123.456,79123,456.79 BND
multicurrency.currencies.dollar.BruneiDollarBNBrunei$ 123.456,79BN$ 123.456,79123,456.79 BND
multicurrency.currencies.dollar.BruneiDollarSGSingapore$ 123.456,79SG$ 123.456,79123,456.79 BND
multicurrency.currencies.lev.BulgarianLevBulgaria123 456,79 лв.123 456,79 лв.123,456.79 BGN
multicurrency.currencies.franc.BurundiFrancBurundi123 457 ₣123 457 BI₣123,457 BIF
multicurrency.currencies.franc.CFAFrancBCEAOSenegal123 457 ₣123 457 ₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBCEAOBFBurkina Faso123 457 ₣123 457 BF₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBCEAOBJBenin123 457 ₣123 457 BJ₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBCEAOCICôte d'Ivoire123 457 ₣123 457 CI₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBCEAOGWGuinea-Bissau123 457 ₣123 457 GW₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBCEAOMLMali123 457 ₣123 457 ML₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBCEAONGNiger123 457 ₣123 457 NG₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBCEAOSNSenegal123 457 ₣123 457 SN₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBCEAOTGTogo123 457 ₣123 457 TG₣123,457 XOF
multicurrency.currencies.franc.CFAFrancBEACCameroon123 457 ₣123 457 ₣123,457 XAF
multicurrency.currencies.franc.CFAFrancBEACCDCongo (Brazzaville)123 457 ₣123 457 CD₣123,457 XAF
multicurrency.currencies.franc.CFAFrancBEACCFCentral African Republic123 457 ₣123 457 CF₣123,457 XAF
multicurrency.currencies.franc.CFAFrancBEACCMCameroon123 457 ₣123 457 CM₣123,457 XAF
multicurrency.currencies.franc.CFAFrancBEACGAGabon123 457 ₣123 457 GA₣123,457 XAF
multicurrency.currencies.franc.CFAFrancBEACGQEquatorial Guinea123 457 ₣123 457 GQ₣123,457 XAF
multicurrency.currencies.franc.CFAFrancBEACTDChad123 457 ₣123 457 TD₣123,457 XAF
multicurrency.currencies.franc.CFPFrancFrench Polynesia123 457 ₣123 457 ₣123,457 XPF
multicurrency.currencies.franc.CFPFrancNCNew Caledonia123 457 ₣123 457 NC₣123,457 XPF
multicurrency.currencies.franc.CFPFrancPFFrench Polynesia123 457 ₣123 457 PF₣123,457 XPF
multicurrency.currencies.franc.CFPFrancWFWallis and Futuna123 457 ₣123 457 WF₣123,457 XPF
multicurrency.currencies.dollar.CanadianDollarENCanada$123,456.79CA$123,456.79123,456.79 CAD
multicurrency.currencies.dollar.CanadianDollarFRCanada123 456,79 $123 456,79 CA$123,456.79 CAD
multicurrency.currencies.escudo.CapeVerdeEscudoCape Verde123 456$79123 456$79123,456.79 CVE
multicurrency.currencies.dollar.CaymanIslandsDollarCayman Islands$123,456.79KY$123,456.79123,456.79 KYD
multicurrency.currencies.cedi.CediGhana₵123,456.79₵123,456.79123,456.79 GHS
multicurrency.currencies.peso.ChileanPesoChile$123.457CL$123.457123,457 CLP
multicurrency.currencies.peso.ColombianPesoColombia$ 123.456,79CO$ 123.456,79123,456.79 COP
multicurrency.currencies.franc.CongoleseFrancCongo (Kinshasa)123 456,79 ₣123 456,79 CD₣123,456.79 CDF
multicurrency.currencies.oro.CordobaOroNicaraguaC$123,456.79C$123,456.79123,456.79 NIO
multicurrency.currencies.colon.CostaRicanColonCosta Rica₡123 456,79₡123 456,79123,456.79 CRC
multicurrency.currencies.kuna.CroatianKunaCroatia123.456,79 Kn123.456,79 Kn123,456.79 HRK
multicurrency.currencies.peso.CubanPesoCuba$123,456.79CU$123,456.79123,456.79 CUP
multicurrency.currencies.koruna.CzechKorunaCzech Republic123 456,79 Kč123 456,79 Kč123,456.79 CZK
multicurrency.currencies.dalasi.DalasiGambiaD 123,456.79D 123,456.79123,456.79 GMD
multicurrency.currencies.krone.DanishKroneDenmark123.456,79 kr123.456,79 kr123,456.79 DKK
multicurrency.currencies.denar.DenarMacedonia123.456,79 ден.123.456,79 ден.123,456.79 MKD
multicurrency.currencies.franc.DjiboutiFrancDjibouti123 457 ₣123 457 DJ₣123,457 DJF
multicurrency.currencies.dobra.DobraSao Tome and Principe123.456,79 Db123.456,79 Db123,456.79 STN
multicurrency.currencies.peso.DominicanPesoDominican Republic$123,456.79DO$123,456.79123,456.79 DOP
multicurrency.currencies.dong.DongVietnam123.457 ₫123.457 ₫123,457 VND
multicurrency.currencies.dollar.EasternCaribbeanDollarOrganisation of Eastern Caribbean States (OECS)$123,456.79$123,456.79123,456.79 XCD
multicurrency.currencies.dollar.EasternCaribbeanDollarAGAntigua and Barbuda$123,456.79AG$123,456.79123,456.79 XCD
multicurrency.currencies.dollar.EasternCaribbeanDollarAIAnguilla$123,456.79AI$123,456.79123,456.79 XCD
multicurrency.currencies.dollar.EasternCaribbeanDollarDMDominica$123,456.79DM$123,456.79123,456.79 XCD
multicurrency.currencies.dollar.EasternCaribbeanDollarGDGrenada$123,456.79GD$123,456.79123,456.79 XCD
multicurrency.currencies.dollar.EasternCaribbeanDollarKNSaint Kitts and Nevis$123,456.79KN$123,456.79123,456.79 XCD
multicurrency.currencies.dollar.EasternCaribbeanDollarLCSaint Lucia$123,456.79LC$123,456.79123,456.79 XCD
multicurrency.currencies.dollar.EasternCaribbeanDollarMSMontserrat$123,456.79MS$123,456.79123,456.79 XCD
multicurrency.currencies.dollar.EasternCaribbeanDollarVCSaint Vincent and Grenadine$123,456.79VC$123,456.79123,456.79 XCD
multicurrency.currencies.pound.EgyptianPoundEgyptج.م. ١٢٣٬٤٥٦٫٧٩ج.م. ١٢٣٬٤٥٦٫٧٩123,456.79 EGP
multicurrency.currencies.birr.EthiopianBirrEthiopiaብር 123,456.79ብር 123,456.79123,456.79 ETB
multicurrency.currencies.euro.Euro123.456,79 €123.456,79 €123,456.79 EUR
multicurrency.currencies.euro.EuroADAndorra123.456,79 €123.456,79 AD€123,456.79 EUR
multicurrency.currencies.euro.EuroATAustria€ 123.456,79AT€ 123.456,79123,456.79 EUR
multicurrency.currencies.euro.EuroBEBelgium€ 123.456,79BE€ 123.456,79123,456.79 EUR
multicurrency.currencies.euro.EuroCYCyprus123.456,79 €123.456,79 CY€123,456.79 EUR
multicurrency.currencies.euro.EuroDEGermany123.456,79 €123.456,79 DE€123,456.79 EUR
multicurrency.currencies.euro.EuroEEEstonia123 456,79 €123 456,79 EE€123,456.79 EUR
multicurrency.currencies.euro.EuroESSpain123.456,79 €123.456,79 ES€123,456.79 EUR
multicurrency.currencies.euro.EuroFIFinland123 456,79 €123 456,79 FI€123,456.79 EUR
multicurrency.currencies.euro.EuroFRFrance123 456,79 €123 456,79 FR€123,456.79 EUR
multicurrency.currencies.euro.EuroGRGreece123.456,79 €123.456,79 GR€123,456.79 EUR
multicurrency.currencies.euro.EuroIEIreland€123,456.79IR€123,456.79123,456.79 EUR
multicurrency.currencies.euro.EuroITItaly123.456,79 €123.456,79 IT€123,456.79 EUR
multicurrency.currencies.euro.EuroLTLithuania123 456,79 €123 456,79 LT€123,456.79 EUR
multicurrency.currencies.euro.EuroLULuxembourg123.456,79 €123.456,79 LU€123,456.79 EUR
multicurrency.currencies.euro.EuroLVLatvia123 456,79 €123 456,79 LV€123,456.79 EUR
multicurrency.currencies.euro.EuroMCMonaco123 456,79 €123 456,79 MC€123,456.79 EUR
multicurrency.currencies.euro.EuroMEMontenegro123.456,79 €123.456,79 ME€123,456.79 EUR
multicurrency.currencies.euro.EuroMTMalta€123,456.79MT€123,456.79123,456.79 EUR
multicurrency.currencies.euro.EuroNLNetherlands€ 123.456,79NL€ 123.456,79123,456.79 EUR
multicurrency.currencies.euro.EuroPTPortugal€ 123.456,79PT€ 123.456,79123,456.79 EUR
multicurrency.currencies.euro.EuroSBAAkrotiri and Dhekelia123.456,79 €123.456,79 €123,456.79 EUR
multicurrency.currencies.euro.EuroSISlovenia123.456,79 €123.456,79 SI€123,456.79 EUR
multicurrency.currencies.euro.EuroSKSlovakia123 456,79 €123 456,79 SK€123,456.79 EUR
multicurrency.currencies.euro.EuroSMSan-Marino123.456,79 €123.456,79 SM€123,456.79 EUR
multicurrency.currencies.euro.EuroVAVatican€123,456.79VA€123,456.79123,456.79 EUR
multicurrency.currencies.euro.EuroXKKosovo123 456,79 €123 456,79 XK€123,456.79 EUR
multicurrency.currencies.pound.FalklandIslandsPoundFalkland Islands£123,456.79FK£123,456.79123,456.79 FKP
multicurrency.currencies.dollar.FijiDollarFiji$123,456.79FJ$123,456.79123,456.79 FJD
multicurrency.currencies.forint.ForintHungary123 457 Ft123 457 Ft123,457 HUF
multicurrency.currencies.lari.GeorgiaLariGeorgia123 456,79 ლ123 456,79 GEლ123,456.79 GEL
multicurrency.currencies.pound.GibraltarPoundGibraltar£123,456.79GI£123,456.79123,456.79 GIP
multicurrency.currencies.gourde.GourdeHaitiG 123,456.79G 123,456.79123,456.79 HTG
multicurrency.currencies.guarani.GuaraniParaguay₲ 123.457₲ 123.457123,457 PYG
multicurrency.currencies.franc.GuineaFrancGuinea123 457 ₣123 457 GN₣123,457 GNF
multicurrency.currencies.dollar.GuyanaDollarGuyana$123,456.79GY$123,456.79123,456.79 GYD
multicurrency.currencies.dollar.HongKongDollarHong Kong$123,456.79HK$123,456.79123,456.79 HKD
multicurrency.currencies.hryvnia.HryvniaUkraine123 456,79 ₴123 456,79 ₴123,456.79 UAH
multicurrency.currencies.krona.IcelandKronaIceland123.457 Kr123.457 Kr123,457 ISK
multicurrency.currencies.rupee.IndianRupeeIndia₹123,456.79₹123,456.79123,456.79 INR
multicurrency.currencies.rupee.IndianRupeeBTBhutan₹123,456.79BT₹123,456.79123,456.79 INR
multicurrency.currencies.rupee.IndianRupeeINIndia₹123,456.79IN₹123,456.79123,456.79 INR
multicurrency.currencies.rial.IranianRialIran۱۲۳٬۴۵۶٫۷۹ ﷼۱۲۳٬۴۵۶٫۷۹ ﷼123,456.79 IRR
multicurrency.currencies.dinar.IraqiDinarIraqد.ع. ١٢٣٬٤٥٦٫٧٨٩د.ع. ١٢٣٬٤٥٦٫٧٨٩123,456.789 IQD
multicurrency.currencies.dollar.JamaicanDollarJamaica$123,456.79JM$123,456.79123,456.79 JMD
multicurrency.currencies.dinar.JordanianDinarJordanد.أ. ١٢٣٬٤٥٦٫٧٨٩د.أ. ١٢٣٬٤٥٦٫٧٨٩123,456.789 JOD
multicurrency.currencies.shilling.KenyanShillingKenyaKsh 123,456.79Ksh 123,456.79123,456.79 KES
multicurrency.currencies.kina.KinaPapua New GuineaK 123,456.79K 123,456.79123,456.79 PGK
multicurrency.currencies.kip.KipLaos₭123.456,79₭123.456,79123,456.79 LAK
multicurrency.currencies.marka.KonvertibilnaMarkaBosnia and Herzegovina123,456.79 КМ123,456.79 КМ123,456.79 BAM
multicurrency.currencies.dinar.KuwaitiDinarKuwaitد.ك. ١٢٣٬٤٥٦٫٧٨٩د.ك. ١٢٣٬٤٥٦٫٧٨٩123,456.789 KWD
multicurrency.currencies.kwacha.KwachaMalawiMK 123,456.79MK 123,456.79123,456.79 MWK
multicurrency.currencies.kwanza.KwanzaAngola123 456,79 Kz123 456,79 Kz123,456.79 AOA
multicurrency.currencies.kyat.KyatMyanmar (Burma)၁၂၃,၄၅၆.၇၉ K၁၂၃,၄၅၆.၇၉ K123,456.79 MMK
multicurrency.currencies.lari.Lari123 456,79 ლ123 456,79 GEლ123,456.79 GEL
multicurrency.currencies.pound.LebanesePoundLebanonل.ل. ١٢٣٬٤٥٧ل.ل. ١٢٣٬٤٥٧123,457 LBP
multicurrency.currencies.lek.LekAlbania123 456,79 Lek123 456,79 Lek123,456.79 ALL
multicurrency.currencies.lempira.LempiraHondurasL 123,456.79L 123,456.79123,456.79 HNL
multicurrency.currencies.leone.LeoneSierra LeoneLe 123,456.79Le 123,456.79123,456.79 SLL
multicurrency.currencies.leu.LeuRomania123.456,79 L123.456,79 L123,456.79 RON
multicurrency.currencies.dollar.LiberianDollarLiberia$123,456.79LR$123,456.79123,456.79 LRD
multicurrency.currencies.dinar.LibyanDinarLibyaد.ل. 123.456,789د.ل. 123.456,789123,456.789 LYD
multicurrency.currencies.lilangeni.LilangeniSwazilandL 123,456.79L 123,456.79123,456.79 SZL
multicurrency.currencies.loti.LotiLesothoL 123,456.79L 123,456.79123,456.79 LSL
multicurrency.currencies.ariary.MalagasyAriaryMadagascar123 457 Ar123 457 Ar123,457 MGA
multicurrency.currencies.ringgit.MalaysianRinggitMalaysiaRM 123,456.79RM 123,456.79123,456.79 MYR
multicurrency.currencies.manat.ManatTurkmenistan123 456,79 m123 456,79 m123,456.79 TMT
multicurrency.currencies.rupee.MauritiusRupeeMauritius₨ 123,456.79₨ 123,456.79123,456.79 MUR
multicurrency.currencies.metical.MeticalMozambique123.457 MTn123.457 MTn123,457 MZN
multicurrency.currencies.peso.MexicanPesoMexico$123,456.79MX$123,456.79123,456.79 MXN
multicurrency.currencies.leu.MoldovanLeuMoldova123.456,79 L123.456,79 L123,456.79 MDL
multicurrency.currencies.dirham.MoroccanDirhamMorocco١٢٣٬٤٥٦٫٧٩ د.م.١٢٣٬٤٥٦٫٧٩ د.م.123,456.79 MAD
multicurrency.currencies.naira.NairaNigeria₦123,456.79₦123,456.79123,456.79 NGN
multicurrency.currencies.nakfa.NakfaEritreaNfk 123,456.79Nfk 123,456.79123,456.79 ERN
multicurrency.currencies.dollar.NamibiaDollarNamibia$123,456.79NA$123,456.79123,456.79 NAD
multicurrency.currencies.rupee.NepaleseRupeeNepalनेरू १२३,४५६.७९नेरू १२३,४५६.७९123,456.79 NPR
multicurrency.currencies.shekel.NewIsraeliShekelIsrael123,456.79 ₪123,456.79 ₪123,456.79 ILS
multicurrency.currencies.shekel.NewIsraeliShekelILIsrael123,456.79 ₪123,456.79 IL₪123,456.79 ILS
multicurrency.currencies.shekel.NewIsraeliShekelPSPalestine123,456.79 ₪123,456.79 PS₪123,456.79 ILS
multicurrency.currencies.dollar.NewZealandDollarNew Zealand$123,456.79$123,456.79123,456.79 NZD
multicurrency.currencies.dollar.NewZealandDollarCKCook Islands$123,456.79CK$123,456.79123,456.79 NZD
multicurrency.currencies.dollar.NewZealandDollarNUNiue$123,456.79NU$123,456.79123,456.79 NZD
multicurrency.currencies.dollar.NewZealandDollarNZNew Zealand$123,456.79NZ$123,456.79123,456.79 NZD
multicurrency.currencies.dollar.NewZealandDollarPNPitcairn Island$123,456.79PN$123,456.79123,456.79 NZD
multicurrency.currencies.ngultrum.NgultrumBhutanNu. ༡༢༣,༤༥༦.༧༩Nu. ༡༢༣,༤༥༦.༧༩123,456.79 BTN
multicurrency.currencies.won.NorthKoreanWonNorth Korea₩ 123,456.79₩ 123,456.79123,456.79 KPW
multicurrency.currencies.krone.NorwegianKroneNorwaykr 123 456,79kr 123 456,79123,456.79 NOK
multicurrency.currencies.nuevo_sol.NuevoSolPeruS/. 123,456.79S/. 123,456.79123,456.79 PEN
multicurrency.currencies.ouguiya.OuguiyaMauritania١٢٣٬٤٥٦٫٧٩ أ.م١٢٣٬٤٥٦٫٧٩ أ.م123,456.79 MRU
multicurrency.currencies.pzloty.PZlotyPoland123 456,79 zł123 456,79 zł123,456.79 PLN
multicurrency.currencies.paanga.PaangaTongaT$ 123,456.79T$ 123,456.79123,456.79 TOP
multicurrency.currencies.rupee.PakistanRupeePakistan₨ 123,456.79₨ 123,456.79123,456.79 PKR
multicurrency.currencies.pataca.PatacaMacaoP 123,456.79P 123,456.79123,456.79 MOP
multicurrency.currencies.peso.PesoUruguayoUruguay$ 123.456,79UY$ 123.456,79123,456.79 UYU
multicurrency.currencies.peso.PhilippinePesoPhilippines₱123,456.79₱123,456.79123,456.79 PHP
multicurrency.currencies.pound.PoundSterlingGreat Britain£123,456.79£123,456.79123,456.79 GBP
multicurrency.currencies.pound.PoundSterlingGBGreat Britain£123,456.79GB£123,456.79123,456.79 GBP
multicurrency.currencies.pound.PoundSterlingGGAlderney£123,456.79GG£123,456.79123,456.79 GBP
multicurrency.currencies.pound.PoundSterlingIMIsle of Man£123,456.79IM£123,456.79123,456.79 GBP
multicurrency.currencies.pound.PoundSterlingIOBritish Indian Ocean Territory£123,456.79IO£123,456.79123,456.79 GBP
multicurrency.currencies.pula.PulaBotswanaP 123,456.79P 123,456.79123,456.79 BWP
multicurrency.currencies.rial.QatariRialQatarر.ق. ١٢٣٬٤٥٦٫٧٩ر.ق. ١٢٣٬٤٥٦٫٧٩123,456.79 QAR
multicurrency.currencies.quetzal.QuetzalGuatemalaQ 123,456.79Q 123,456.79123,456.79 GTQ
multicurrency.currencies.rand.RandSouth AfricaR 123 456.79R 123 456.79123,456.79 ZAR
multicurrency.currencies.rand.RandLSLesothoR 123,456.79LSR 123,456.79123,456.79 ZAR
multicurrency.currencies.rand.RandNANamibiaR 123 456.79NAR 123 456.79123,456.79 ZAR
multicurrency.currencies.rand.RandZASouth AfricaR 123 456.79ZAR 123 456.79123,456.79 ZAR
multicurrency.currencies.rial.RialOmaniOmanر.ع. ١٢٣٬٤٥٦٫٧٨٩ر.ع. ١٢٣٬٤٥٦٫٧٨٩123,456.789 OMR
multicurrency.currencies.riel.RielCambodia123.456,79៛123.456,79៛123,456.79 KHR
multicurrency.currencies.rufiyaa.RufiyaaMaldivesރ. 123,456.79ރ. 123,456.79123,456.79 MVR
multicurrency.currencies.rupiah.RupiahIndonesiaRp 123.456,79Rp 123.456,79123,456.79 IDR
multicurrency.currencies.ruble.RussianRubleRussia123 456,79 ₽123 456,79 ₽123,456.79 RUB
multicurrency.currencies.ruble.RussianRubleGESouth Ossetia123 456,79 ₽123 456,79 GE₽123,456.79 RUB
multicurrency.currencies.ruble.RussianRubleRURussia123 456,79 ₽123 456,79 RU₽123,456.79 RUB
multicurrency.currencies.franc.RwandaFrancRwanda₣ 123.457RW₣ 123.457123,457 RWF
multicurrency.currencies.pound.SaintHelenaPoundSaint Helena£123,456.79SH£123,456.79123,456.79 SHP
multicurrency.currencies.pound.SaintHelenaPoundAIAscension Island£123,456.79SH£123,456.79123,456.79 SHP
multicurrency.currencies.pound.SaintHelenaPoundTCTristan da Cunha£123,456.79SH£123,456.79123,456.79 SHP
multicurrency.currencies.riyal.SaudiRiyalSaudi Arabiaر.س. ١٢٣٬٤٥٦٫٧٩ر.س. ١٢٣٬٤٥٦٫٧٩123,456.79 SAR
multicurrency.currencies.dinar.SerbianDinarSRSerbia123 456,79 дин.123 456,79 дин.123,456.79 RSD
multicurrency.currencies.dinar.SerbianDinarXKKosovo123.456,79 дин.123.456,79 дин.123,456.79 RSD
multicurrency.currencies.rupee.SeychellesRupeeSeychelles₨ 123,456.79₨ 123,456.79123,456.79 SCR
multicurrency.currencies.dollar.SingaporeDollarSingapore$123,456.79$123,456.79123,456.79 SGD
multicurrency.currencies.dollar.SingaporeDollarBNBrunei$123,456.79BN$123,456.79123,456.79 SGD
multicurrency.currencies.dollar.SingaporeDollarSGSingapore$123,456.79SG$123,456.79123,456.79 SGD
multicurrency.currencies.dollar.SolomonIslandsDollarSolomon Islands$123,456.79SB$123,456.79123,456.79 SBD
multicurrency.currencies.som.SomKyrgyzstan123 456,79 Лв123 456,79 Лв123,456.79 KGS
multicurrency.currencies.shilling.SomaliShillingSomaliaSSh 123,456.79SSh 123,456.79123,456.79 SOS
multicurrency.currencies.somoni.SomoniTajikistanЅМ 123,456.79ЅМ 123,456.79123,456.79 TJS
multicurrency.currencies.won.SouthKoreanWonSouth Korea₩123,457₩123,457123,457 KRW
multicurrency.currencies.lari.SouthOssetiaLariSouth Ossetia123 456,79 ლ123 456,79 GEლ123,456.79 GEL
multicurrency.currencies.rupee.SriLankaRupeeSri Lankaරු. 123,456.79රු. 123,456.79123,456.79 LKR
multicurrency.currencies.pound.SudanesePoundSudan١٢٣٬٤٥٦٫٧٩ ج.س١٢٣٬٤٥٦٫٧٩ ج.س123,456.79 SDG
multicurrency.currencies.dollar.SurinameDollarSuriname$ 123.456,79SR$ 123.456,79123,456.79 SRD
multicurrency.currencies.krona.SwedishKronaSweden123 456,79 kr123 456,79 kr123,456.79 SEK
multicurrency.currencies.franc.SwissFrancSwitzerland₣ 123'456.79₣ 123'456.79123,456.79 CHF
multicurrency.currencies.franc.SwissFrancCHSwitzerland₣ 123'456.79CH₣ 123'456.79123,456.79 CHF
multicurrency.currencies.franc.SwissFrancLILiechtenstein₣ 123'456.79LI₣ 123'456.79123,456.79 CHF
multicurrency.currencies.pound.SyrianPoundSyria١٢٣٬٤٥٦٫٧٩ ل.س١٢٣٬٤٥٦٫٧٩ ل.س123,456.79 SYP
multicurrency.currencies.dollar.TaiwanDollarTaiwan$123,456.79TW$123,456.79123,456.79 TWD
multicurrency.currencies.taka.TakaBangladesh১২৩,৪৫৬.৭৯৳১২৩,৪৫৬.৭৯৳123,456.79 BDT
multicurrency.currencies.tala.TalaSamoaT 123,456.79T 123,456.79123,456.79 WST
multicurrency.currencies.shilling.TanzanianShillingTanzaniaTSh 123,456.79TSh 123,456.79123,456.79 TZS
multicurrency.currencies.tenge.TengeKazakhstan123 456,79 〒123 456,79 〒123,456.79 KZT
multicurrency.currencies.dollar.TrinidadandTobagoDollarTrinidad and Tobago$123,456.79TT$123,456.79123,456.79 TTD
multicurrency.currencies.tugrik.TugrikMongolia₮ 123,456.79₮ 123,456.79123,456.79 MNT
multicurrency.currencies.dinar.TunisianDinarTunisiaد.ت. 123.456,789د.ت. 123.456,789123,456.789 TND
multicurrency.currencies.lira.TurkishLiraTurkey₤123.456,79₤123.456,79123,456.79 TRY
multicurrency.currencies.lira.TurkishLiraCYNorth Cyprus₤123.456,79CY₤123.456,79123,456.79 TRY
multicurrency.currencies.lira.TurkishLiraTRTurkey₤123.456,79TR₤123.456,79123,456.79 TRY
multicurrency.currencies.dirham.UAEDirhamUAEد.إ. ١٢٣٬٤٥٦٫٧٩د.إ. ١٢٣٬٤٥٦٫٧٩123,456.79 AED
multicurrency.currencies.dollar.USDollarUnited States of America$123,456.79US$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarASAmerican Samoa$123,456.79AS$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarFMMicronesia$123,456.79FM$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarGUGuam$123,456.79GU$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarHTHaiti$123,456.79HT$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarIOBritish Indian Ocean Territory$123,456.79IO$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarMHMarshall Islands$123,456.79MH$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarMPNorthern Mariana Islands$123,456.79MP$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarPAPanama$123,456.79PA$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarPCPacific Remote Islands$123,456.79PC$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarPRPuerto Rico$123,456.79PR$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarPWPalau$123,456.79PW$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarTCTurks and Caicos Islands$123,456.79TC$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarVGBritish Virgin Islands$123,456.79VG$123,456.79123,456.79 USD
multicurrency.currencies.dollar.USDollarVIUS Virgin Islands$123,456.79VI$123,456.79123,456.79 USD
multicurrency.currencies.shilling.UgandaShillingUgandaUSh 123,457USh 123,457123,457 UGX
multicurrency.currencies.sum.UzbekistanSumUzbekistan123 456,79 сўм123 456,79 сўм123,456.79 UZS
multicurrency.currencies.vatu.VatuVanuatuVt 123,457Vt 123,457123,457 VUV
multicurrency.currencies.rial.YemeniRialYemen١٢٣٬٤٥٦٫٧٩ ﷼١٢٣٬٤٥٦٫٧٩ ﷼123,456.79 YER
multicurrency.currencies.yen.YenJapan¥123,457¥123,457123,457 JPY
multicurrency.currencies.yuan.YuanChina¥123,456.79¥123,456.79123,456.79 CNY
multicurrency.currencies.kwacha.ZambianKwachaZambiaZK 123,456.79ZK 123,456.79123,456.79 ZMW
multicurrency.currencies.dollar.ZimbabweDollarZimbabwe$ 123,456.79ZW$ 123,456.79123,456.79 ZWL

Supported Cryptocurrencies

Table of supported cryptocurrencies (and default format):

CryptocurrencyDefaultLocalizedInternational
multicurrency.currencies.crypto.Bitcoin₿123,456.78900000₿123,456.78900000123,456.78900000 XBT
multicurrency.currencies.crypto.EOSε123,456.7890ε123,456.7890123,456.7890 EOS
multicurrency.currencies.crypto.EthereumΞ123,456.789000000000000000Ξ123,456.789000000000000000123,456.789000000000000000 ETH
multicurrency.currencies.crypto.Moneroɱ123,456.789000000000ɱ123,456.789000000000123,456.789000000000 XMR
multicurrency.currencies.crypto.Ripple✕123,456.789000✕123,456.789000123,456.789000 XRP
multicurrency.currencies.crypto.StellarLumens*123,456.7890000*123,456.7890000123,456.7890000 XLM
multicurrency.currencies.crypto.Tezosꜩ123,456.789000ꜩ123,456.789000123,456.789000 XTZ
multicurrency.currencies.crypto.Zcashⓩ123,456.78900000ⓩ123,456.78900000123,456.78900000 ZEC

Build (from source)

just is used to automate several steps of the development process.

All of the commands described bellow are to be executed on the root folder of this project.

A development environment can be created using the following command:

just init

To build a Python package for this library use the following command:

just build

After this you should have a wheel file (*.whl) inside a folder called dist.

The library can be install using the wheel file and pip3:

pip3 --quiet install dist/multicurrency-*.whl

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

Please read the CONTRIBUTING.md file for more details on how to contribute to this project.

Versioning

This project uses SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Frederico Martins - fscm

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc