Skip to main content

ISO 4217 currency data package for Python

Project description

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

This Python package contains ISO 4217 currency data, represented as enum module which was introduced in 3.4. Note that this works on Python 2.7 as well as 3.10, the latest version of Python, through enum34 package.

>>> 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

Written by Hong Minhee. Distributed under Public Domain.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iso4217-1.7.20211001.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

iso4217-1.7.20211001-py2.py3-none-any.whl (10.3 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file iso4217-1.7.20211001.tar.gz.

File metadata

  • Download URL: iso4217-1.7.20211001.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for iso4217-1.7.20211001.tar.gz
Algorithm Hash digest
SHA256 4e59fed74ae06c4263daa7db1982075cb8aa6c8ea0bc44f81d30607025eab9e5
MD5 64284862935c2667c1773130ecf0ab0a
BLAKE2b-256 bb4cdf2c3fb6d9e0a7cebc9488335672ab332ed37155e9572737f3f3c5ddc03f

See more details on using hashes here.

File details

Details for the file iso4217-1.7.20211001-py2.py3-none-any.whl.

File metadata

  • Download URL: iso4217-1.7.20211001-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.1

File hashes

Hashes for iso4217-1.7.20211001-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 346735c9ec7f8c737857fc70a613ffcb97cdeaa7a149cb168080b3619b722ccc
MD5 428324b281870973b237a62a134185bb
BLAKE2b-256 6f4613ef8b4f9390e45d576661822bd33cdffc4cafec5157d6d8a29d068b4e8b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page