Skip to main content

A small library for getting information on cash exchange rates of the NBU for the selected date range

Project description

PyPI - Python Version

PyPI - Developer Build Status PyPI - License

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?

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

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


Download files

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

Source Distribution

nbu-exchange-rates-1.0.1.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

nbu_exchange_rates-1.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

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

Hashes for nbu-exchange-rates-1.0.1.tar.gz
Algorithm Hash digest
SHA256 53e7cbb86fefccfdf9c2a4bf72f3131598663fb1d3fec81af98631de5cbd70fa
MD5 9e9db7377222ae3a28680805ece94943
BLAKE2b-256 1ed639567a787cbd90581f8b104e6601e2ccb083e5c806061024487967fa8a6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for nbu_exchange_rates-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 79525d39399d8cc6839d586fb2d801f75745fc0335462b3ad62310bc160eeeac
MD5 39965ea3020004205e6d5ca2561d0b0d
BLAKE2b-256 c1234887df422a69fcccc820b4d21284f763494fa26daa25d81c082e58338253

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