{"id":5970,"library":"iso4217","title":"ISO 4217 Currency Data","description":"The `iso4217` library provides ISO 4217 currency data for Python, represented as an `enum` module. It offers access to current and historical currency codes, names, and numerical values. The library is actively maintained with version `1.16.20260101` and releases new versions regularly to reflect updates to the ISO 4217 standard, typically indicated by a date-based versioning scheme.","status":"active","version":"1.16.20260101","language":"en","source_language":"en","source_url":"https://github.com/dahlia/iso4217","tags":["currency","ISO 4217","finance","enum"],"install":[{"cmd":"pip install iso4217","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"note":"The `iso4217` package by dahlia exposes currencies as an `Enum`. Functions like `find_currency` or `iter_currency` belong to other, similarly named libraries (e.g., `python-iso4217`) with different APIs.","wrong":"from iso4217 import find_currency","symbol":"Currency","correct":"from iso4217 import Currency"}],"quickstart":{"code":"from iso4217 import Currency\n\n# Access a currency by its alpha-3 code\nusd = Currency.USD\nprint(f\"USD: {usd.currency_name} ({usd.numeric_code})\")\n\n# Access a currency by its numeric code (if enum supports it, or by value)\ntry:\n    eur = Currency(978) # Access by numeric value\n    print(f\"EUR: {eur.currency_name} ({eur.alpha_code})\")\nexcept ValueError:\n    # If direct numeric access isn't supported, iterate or use a helper (not in this library)\n    eur = next((c for c in Currency if c.numeric_code == 978), None)\n    if eur:\n        print(f\"EUR (found by numeric code): {eur.currency_name} ({eur.alpha_code})\")\n\n# Iterate through all active currencies\nprint(\"\\nAll active currencies:\")\nfor currency in Currency:\n    print(f\"- {currency.alpha_code}: {currency.currency_name}\")\n","lang":"python","description":"The quickstart demonstrates how to import the `Currency` Enum, access specific currencies by their alpha-3 code (e.g., `Currency.USD`), and iterate through all available currencies. Each currency object provides attributes like `currency_name`, `alpha_code`, and `numeric_code`."},"warnings":[{"fix":"Always verify the import paths and API calls against the specific package's documentation or by inspecting the package content. For `dahlia/iso4217`, currencies are typically accessed as members of an `Enum`.","message":"There are several Python packages with similar names (e.g., `python-iso4217`, `iso_4217`, `iso4217parse`) that provide ISO 4217 data but have distinct APIs and features. Ensure you are using the `iso4217` package by `dahlia` to avoid unexpected behavior or import errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Regularly update the package to its latest version (`pip install --upgrade iso4217`) to ensure you have the most current ISO 4217 data. The package's versioning (e.g., `1.16.YYYYMMDD`) often indicates the date of the data snapshot.","message":"ISO 4217 currency data is subject to periodic amendments (e.g., currency adoptions, withdrawals). Relying on an outdated version of the `iso4217` package can lead to incorrect or incomplete currency information.","severity":"gotcha","affected_versions":"< 1.16.20260101"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z","problems":[]}