A small library for getting information on cash exchange rates of the NBU for the selected date range
Project description
Official Repo: https://github.com/lesykbiceps/nbu-exchange-rates
Welcome! Using this library you can collect exchange rates and reproduce this information in various forms. You can do various manipulations with the obtained data:
- Save the data in json or csv format
- Get graphs of how the exchange rate of a particular currency has changed
- Get the selected exchange rate
Those who have access to data have great opportunities
Libraries
It uses the following libraries:
| Library | Link |
|---|---|
| Requests | https://pypi.org/project/requests/ |
| Matplotlib | https://pypi.org/project/matplotlib/ |
Why you need them?
- Requests for requests to exchange rates
- matplotlib to draw a graph
Additional info
Also you should have python3-tk installed or any of the matplotlib supported GUI backends For example on Linux:
sudo apt-get install python3-tk
Quick Install / Usage
pip install nbu_exchange_rates
import json
import csv
from datetime import datetime
from nbu_exchange_rates import get_exchange_rates,format_time,to_json,to_csv,get_diagram
def main():
exchange_rates = get_exchange_rates(datetime(day=19, month=4, year=2022), datetime(day=23, month=4, year=2022),
currency='Євро')
to_json(exchange_rates)
to_csv(exchange_rates)
get_diagram(exchange_rates)
# Output:
# Євро:31.6216 (19.04.2022)
# Євро:31.5792 (20.04.2022)
# Євро:31.6787 (21.04.2022)
# Євро:31.8264 (22.04.2022)
Available currencies
- USD | Долар США
- EUR | Євро
- PLN | Злотий
- GBP | Фунт стерлінгів
- TRY | Турецька ліра
- CAD | Канадський долар
- for more currencies follow this link https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?date=20220402&json
License
Data are taken from the link: https://bank.gov.ua/NBUStatService/v1/statdirectory/exchange?date=20220402&json MIT
Free Software, Hell Yeah!
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 nbu-exchange-rates-1.0.1.tar.gz.
File metadata
- Download URL: nbu-exchange-rates-1.0.1.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
53e7cbb86fefccfdf9c2a4bf72f3131598663fb1d3fec81af98631de5cbd70fa
|
|
| MD5 |
9e9db7377222ae3a28680805ece94943
|
|
| BLAKE2b-256 |
1ed639567a787cbd90581f8b104e6601e2ccb083e5c806061024487967fa8a6a
|
File details
Details for the file nbu_exchange_rates-1.0.1-py3-none-any.whl.
File metadata
- Download URL: nbu_exchange_rates-1.0.1-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
79525d39399d8cc6839d586fb2d801f75745fc0335462b3ad62310bc160eeeac
|
|
| MD5 |
39965ea3020004205e6d5ca2561d0b0d
|
|
| BLAKE2b-256 |
c1234887df422a69fcccc820b4d21284f763494fa26daa25d81c082e58338253
|