Is there a package that maintains a list all currencies with symbols?

后端 未结 3 1343
广开言路
广开言路 2021-02-20 11:36

Is there a python package that provides list of all (or fairly complete) currencies with the symbols (like \"$\" for USD).

There are excellent pycount

3条回答
  •  别那么骄傲
    2021-02-20 12:11

    I created Forex-python package which maintains all latest Currency code and its sign.

    >>> from forex_python.converter import CurrencyCodes
    >>> c = CurrencyCodes()
    >>> print c.get_symbol('GBP')
    £
    

    And you can convert amount from one currency to other.

    >>> from forex_python.converter import CurrencyRates
    >>> c = CurrencyRates()
    >>> c.convert('USD', 'INR', 10)
    674.73
    

提交回复
热议问题