Skip to main content

A lightweight wrapper for the frankfurter API

Project description

frankfurter - Unofficial Lightweight Wrapper for the frankfurter API

The Frankfurter API tracks foreign exchange references rates published by the European Central Bank. The data refreshes around 16:00 CET every working day.

Installation

You can directly download it from pip using the command

pip install frankfurter

Usage

First, you need to make a object of the FrankfurterEngine class. It takes an argument called quiet_mode which decides whether to print the logging information.

from frankfurter import FrankfurterEngine

engine = FrankfurterEngine(quiet_mode=False)

Get List of Supported Currencies

To fetch the list of supported currencies:

currencies = engine.fetch_currencies()
print(currencies)

Fetch Latest Forex Data

To fetch the latest forex data for a base currency and an optional target currency:

latest_data = engine.fetch_latest_data(base="USD", to="EUR")
print(latest_data)

Fetch Historical Data for a Specific Date

To fetch forex data for a specific date:

historical_data = engine.fetch_data_for_date(date="2022-01-01", base="USD", to="EUR")
print(historical_data)

Fetch Time Series Data

To fetch forex data over a date range:

time_series_data = engine.fetch_time_series_data(
    base="USD", to="EUR", start_date="2022-01-01", end_date="2022-12-31"
)
print(time_series_data)

API Documentation

API Documentation For more information on the API itself, visit the official documentation.

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

frankfurter-1.0.1.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

frankfurter-1.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file frankfurter-1.0.1.tar.gz.

File metadata

  • Download URL: frankfurter-1.0.1.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for frankfurter-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4e873da00e65a3bf85b0b28ee06d60de598862f64eb8c295c8034f9c7cc0081e
MD5 c137d4f2f06c9b97069d870d0a9bd01b
BLAKE2b-256 c968044cb1901fc88eb55a6dfebbf57f6d1f9ed22205fdfae5c2ed1d30c9d93a

See more details on using hashes here.

File details

Details for the file frankfurter-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: frankfurter-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for frankfurter-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbbba35639663cf68fb2a85a73d74b1faea3cf0afb1a16376848df498637df0d
MD5 e1cdddd20ffb316d759ddc7bf4d28ee4
BLAKE2b-256 c3fffdba86cdb55cd08509440041478dfd733b52316d4d7e1df4c2251014ea9c

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