跳转到主要内容

Python的ISO 4217货币数据包

项目描述

https://badge.fury.io/py/iso4217.svg? https://github.com/dahlia/iso4217/actions/workflows/main.yaml/badge.svg

此Python包包含ISO 4217货币数据,表示为3.4中引入的enum模块。

>>> from iso4217 import Currency
>>> Currency.USD
<Currency.USD: 'USD'>
>>> Currency.USD.code
'USD'
>>> Currency.USD.currency_name
'US Dollar'
>>> Currency.USD.exponent  # USD has cents
2
>>> Currency.JPY
<Currency.JPY: 'JPY'>
>>> Currency.JPY.currency_name
'Yen'
>>> Currency.JPY.exponent  # JPY has no minor units
0
>>> Currency('KRW')  # Get by the code string
<Currency.KRW: 'KRW'>
>>> Currency.KRW is Currency('KRW')
True
>>> Currency.krw is Currency.KRW  # Lower enumerants are also available

Hong Minhee编写。在公共领域下发行。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定该选择哪个,请了解有关安装包的更多信息。

源分发

iso4217-1.12.20240625.tar.gz (12.7 kB 查看哈希值)

上传时间:

构建分发

iso4217-1.12.20240625-py2.py3-none-any.whl (10.9 kB 查看哈希值)

上传时间: Python 2 Python 3

由支持