国家和货币ISO代码库
teritorio的Python项目详细描述
teritorio:ISO国家和货币代码
安装和使用
安装
teritorio可以通过运行pip install teritorio
来安装。它需要python3.7.0+才能运行。在
用法
两个主要对象是Countries
和Currencies
:
国家/地区使用情况
fromteritorioimportCountries# list all countriesforcountryinCountries():print(country)# get a specific countrycountries=Countries()# access the country as an attributeprint(countries.DEU)# Country(english_name='Germany', french_name="Allemagne (l')", alpha_2_code='DE', alpha_3_code='DEU', numeric_code=276)# access the country with square bracketsprint(countries["DEU"])# Country(english_name='Germany', french_name="Allemagne (l')", alpha_2_code='DE', alpha_3_code='DEU', numeric_code=276)
货币使用
^{pr2}$
标签:
- 项目
标签: