Skip to main content

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

Project description

PyPI - Python Version

PyPI - Developer

Official Repo: https://gtlb.jetsoftpro.com/vitoldkliain/vk-exchange-rates

The library allows you to collect exchange rates from two Ukrainian banks: PrivatBank and National Bank of Ukraine. What can you do:

  • Get the exchange rate of each currency for a certain period
  • Save data in csv and json format
  • Get a graph how a currency changed in the selected period

Libraries

It uses the following libraries:

  • requests for requests to exchange rates
  • numpy to calculation for better data visualization
  • matplotlib to draw a graph
  • pandas to set a DataFrame

Quick Install / Usage

pip install vk-exchange-rates
from datetime import datetime

from vk_exchange_rates import get_exchange_rates, show_graph, save_to_csv, save_to_json


def main():
    get_exchange_rates(datetime(2022, 4, 20), datetime(2022, 4, 27))
    # show_graph(currency='PLN')
    # save_to_json(datetime(2022, 4, 25))
    # save_to_csv(datetime(2022, 4, 20), datetime(2022, 4, 27), currency='USD')

    # Output:
    # Exchange rates (sale) National Bank of Ukraine:
    # {'date': '20.04.2022', 'rates': {'AUD': 21.5418, 'CAD': 23.1906, 'CNY': 4.5801, 'HRK': 4.176, 'CZK': 1.293, ... }
    # Exchange rates (sale) PrivatBank:
    # {'date': '20.04.2022', 'rates': {'AZN': 17.2433, 'BYN': 10.6335, 'CAD': 23.1906, 'CHF': 33.82, 'CNY': 4.5801, ... }

Most popular currencies

  • USD
  • EUR
  • PLN
  • GBP
  • CHF
  • CZK

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

vk-exchange-rates-0.0.3.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file vk-exchange-rates-0.0.3.tar.gz.

File metadata

  • Download URL: vk-exchange-rates-0.0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.10

File hashes

Hashes for vk-exchange-rates-0.0.3.tar.gz
Algorithm Hash digest
SHA256 909d4d8bfd0f94df302ab45de9601f72f51ebc8798038cf701298a81905da15c
MD5 529e7ad02193f5dbf8344279f0fc3993
BLAKE2b-256 9617c59ebf7392921e43af7dc74c67ce5f8759cec4e91205f9035d5663a6e0c4

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