countrystatecity-currencies
Official Python package for currency data — 250+ entries covering currency codes, symbols, and country associations. Part of the countrystatecity ecosystem.
Installation
pip install countrystatecity-currencies
Quick Start
from countrystatecity_currencies import (
get_all_currencies,
get_currency_by_country,
get_countries_by_currency,
search_currencies,
)
# Get all currency entries
currencies = get_all_currencies()
# [Currency(code="AFN", name="Afghan afghani", symbol="؋", countryCode="AF", ...), ...]
# Get the currency for a country
usd = get_currency_by_country("US")
# Currency(code="USD", name="United States dollar", symbol="$", countryCode="US", ...)
# Get all countries using a currency
euro_countries = get_countries_by_currency("EUR")
# [Currency(code="EUR", countryCode="DE", ...), Currency(code="EUR", countryCode="FR", ...), ...]
# Search by code, name, or symbol
results = search_currencies("dollar")
# [Currency(code="USD", ...), Currency(code="CAD", ...), ...]
Data Model
class Currency(BaseModel):
code: str # ISO 4217 currency code (e.g., "USD")
name: str # Full currency name (e.g., "United States dollar")
symbol: str # Currency symbol (e.g., "$")
countryCode: str # ISO2 country code (e.g., "US")
countryName: str # Country name (e.g., "United States")
API Reference
| Function | Description |
|---|---|
get_all_currencies() |
Get all currency entries (one per country) |
get_currency_by_country(code) |
Get the currency for an ISO2 country code |
get_countries_by_currency(code) |
Get all countries using an ISO 4217 currency code |
search_currencies(query) |
Search by currency code, name, or symbol |
License
ODbL-1.0 — see LICENSE.
Other Packages in this Ecosystem
| Package | Description |
|---|---|
| countrystatecity-countries | 250+ countries, 5,000+ states, 150,000+ cities |
| countrystatecity-timezones | 400+ IANA timezones with country associations and time conversion |
| countrystatecity-translations | Country name translations in 18+ languages |
| countrystatecity-phonecodes | International phone/dialing codes for 250+ countries |
| countrystatecity-regions | Continents and geographic subregions for 250+ countries |
| countrystatecity-postal-codes | Postal/ZIP codes and format validation for 125+ countries |
Data sourced from countries-states-cities-database.
Made with ❤️ by dr5hn
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file countrystatecity_currencies-1.0.4.tar.gz.
File metadata
- Download URL: countrystatecity_currencies-1.0.4.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a45f0ebc17ab1af8e41a1915cd17850de9ee4bffde31953e74f9addfc88bcbbe
|
|
| MD5 |
a9e794e1b74d2b32eb541342139df604
|
|
| BLAKE2b-256 |
81d90c6f2cd6ba30cde22b6c821f0a8bfd3418ed7556f5e967eab488a1f83e10
|
File details
Details for the file countrystatecity_currencies-1.0.4-py3-none-any.whl.
File metadata
- Download URL: countrystatecity_currencies-1.0.4-py3-none-any.whl
- Upload date:
- Size: 11.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a311052ffd68040067d647a4ab587b2fa1c1f757053ec4802ec33873e8d22b7
|
|
| MD5 |
8aa97c2d3fe0d62e030f2ca0d4186792
|
|
| BLAKE2b-256 |
bc71a0ce72416093eb82d8ecff7614071e1c3d13c37678ef178649b4bee5d914
|