Unofficial client to interact with the Exchange Rate API V6
Project description
Exchange Rate API Client
Unofficial client to interact with the Exchange Rate API V6.
- Simple API client: Easy-to-use interface to interact with the Exchange Rate API.
- Open Access Support: Fetch exchange rates without requiring an API key.
Installation
Install package from PyPi with:
pip install exchange-rate-api-client
Usage
API Client
You can initializate a api client with your API key to access all endpoints:
from exchange_rate_api_client import ExchangeRateApiV6Client
client = ExchangeRateApiV6Client(api_key="<YOUR_API_KEY>")
# Example: Convert 100 USD to EUR
conversion = client.pair_conversion(
base_code="USD",
target_code="EUR",
amount=100,
)
print(conversion)
Open Access
For basic access without an API key, fetch the latest exchange rates:
from exchange_rate_api_client import fetch_exchange_rates
# Example: Fetch exchange rates for USD
data = fetch_exchange_rates(base_code="USD")
print(data)
Additional Examples
Fetch enriched data:
data = client.fetch_enriched_data(
base_code="USD",
target_code="JPY",
)
print(data)
Fetch historical data:
from datetime import date
data = client.fetch_historical_data(
base_code="USD",
date_obj=date(2023, 1, 1),
amount=100,
)
print(data)
Requirements
- Python 3.7 or higher
- An API key from Exchange Rate API for full access.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Contributing
Contributions are welcome! Feel free to submit issues or pull requests to improve the client.
Links
Project details
Release history Release notifications | RSS feed
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 exchange_rate_api_client-0.1.1.tar.gz.
File metadata
- Download URL: exchange_rate_api_client-0.1.1.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3f607d1d6164dd898e279374f7e7747bc330150f8ad8e6b0599919256c71258e
|
|
| MD5 |
52551e6d346e23ca2ab4ad3c80ff7c34
|
|
| BLAKE2b-256 |
99e24df7f4c695f745c14bd2c69e14ba813bf3e7f05b45708e54180aa0b15b80
|
File details
Details for the file exchange_rate_api_client-0.1.1-py3-none-any.whl.
File metadata
- Download URL: exchange_rate_api_client-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
007c7638d7e11df1c2dd991729171f20750a3e67b5f09bcd25f8917ddba938fa
|
|
| MD5 |
2723135b32ea524265d87bb7dbb2af11
|
|
| BLAKE2b-256 |
ece2ebd762a35165c8305d9580dd34dd32567d691f40b6ceddadd27735b88e4e
|