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.2.tar.gz (4.0 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: vk-exchange-rates-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ed177f525c959d575df1d85f5130975a5b8060c204c224b0f6b961cd7c64cb90
MD5 cf5c9e331f8d8b98208ee751be698037
BLAKE2b-256 825b93c64650411c4bc74ff95c9c0d5d201500ef95b483cb1afad309f62b67a9

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