Get currency symbol by currency code
Maintained. Last release 4 months ago, commits in 3 of the last 26 weeks. Weaker on commit activity and release cadence.
$
pip install currency-symbolscurrency-symbols :money_with_wings:
Get the currency symbol for an ISO 4217 currency code — USD → $, EUR → €, INR → ₹.
- Covers all active ISO 4217 codes, plus common historical, crypto and commodity codes
- Zero dependencies
- Fully typed (PEP 561, ships
py.typed) - Python 3.9+
Installation
pip install currency-symbols
Usage
from currency_symbols import CurrencySymbols
CurrencySymbols.get_symbol("USD")
# '$'
CurrencySymbols.get_symbol("EUR")
# '€'
CurrencySymbols.get_symbol("gbp")
# '£' — codes are case-insensitive
CurrencySymbols.get_symbol("XYZ")
# None — unknown codes return None
Changelog
All notable changes are documented in the CHANGELOG.
Contributing
Interested in contributing to this project? You can log any issues or suggestions related to this library here
Read our contributing guide on getting started with contributing to the codebase
Credits
Inspired by work of @bengourley on currency-symbol-map