Skip to main content

Unofficial client to interact with the Exchange Rate API V6

Project description

Exchange Rate API Client

PyPI - Python Version PyPI - License PyPI Downloads

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

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


Download files

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

Source Distribution

exchange_rate_api_client-0.1.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exchange_rate_api_client-0.1.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

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

Hashes for exchange_rate_api_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3f607d1d6164dd898e279374f7e7747bc330150f8ad8e6b0599919256c71258e
MD5 52551e6d346e23ca2ab4ad3c80ff7c34
BLAKE2b-256 99e24df7f4c695f745c14bd2c69e14ba813bf3e7f05b45708e54180aa0b15b80

See more details on using hashes here.

File details

Details for the file exchange_rate_api_client-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for exchange_rate_api_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 007c7638d7e11df1c2dd991729171f20750a3e67b5f09bcd25f8917ddba938fa
MD5 2723135b32ea524265d87bb7dbb2af11
BLAKE2b-256 ece2ebd762a35165c8305d9580dd34dd32567d691f40b6ceddadd27735b88e4e

See more details on using hashes here.

Supported by

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