Metadata-Version: 2.1
Name: frankfurter
Version: 2.0.0
Summary: A lightweight wrapper for the frankfurter API
Home-page: https://www.frankfurter.app
Author: Pranav Chaturvedi
Author-email: pranavhfs1@gmail.com
Maintainer: PranavChaturvedi
License: MIT
Project-URL: Homepage, https://www.frankfurter.app
Project-URL: Documentation, https://github.com/PranavChaturvedi/frankfurter/blob/main/README.md
Project-URL: Repository, https://github.com/PranavChaturvedi/frankfurter
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# frankfurter - Unofficial Lightweight Wrapper for the frankfurter API


[![Downloads](https://static.pepy.tech/badge/frankfurter)](https://pepy.tech/project/frankfurter)
[![PyPI](https://badge.fury.io/py/frankfurter.svg)](https://pypi.org/project/frankfurter/)


The Frankfurter API tracks foreign exchange references rates published by the [European Central Bank](https://www.ecb.europa.eu/stats/policy_and_exchange_rates/euro_reference_exchange_rates/html/index.en.html). 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](https://www.frankfurter.app/docs/).


