Skip to main content

A small library for getting information on some currency exchange rates into UAH, on the selected date

Project description

PyPI - Python Version

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

It uses the following libraries:

Quick Install / Usage

pip install vkudak-exchange-rates
from datetime import datetime

from vkudak_exchange_rates import get_exchange_rates, get_curr_rates_on_time_interval


def main():
    curr = "USD" 
    my_date = datetime(day=21, month=4, year=2022)
    exchange_rates = get_exchange_rates(my_date, curr)

    print(exchange_rates)
    # Output:
    # {
    # datetime.datetime(2022, 4, 20, 0, 0): 
    #   {
    #   'Приватбанк': [29.255, 32.18], <-- purchase, sale
    #   'Ощадбанк': [29.5, 32.18]
    #   }
    # }
    
    start_date = datetime(day=20, month=4, year=2022)
    end_date = datetime(day=24, month=4, year=2022)
    step = 1
    res = get_curr_rates_on_time_interval(curr, start_date, end_date, step, save_to="csv", plot=True)
    
    print(res)
    # Output:
    # {
    #     datetime.datetime(2022, 4, 20, 0, 0): {'Приватбанк': [29.255, 32.18], 'Ощадбанк': [29.5, 32.18]}, 
    #     datetime.datetime(2022, 4, 21, 0, 0): {'Приватбанк': [29.255, 32.18], 'Ощадбанк': [29.5, 32.18]}, 
    #     datetime.datetime(2022, 4, 22, 0, 0): {'Приватбанк': [29.255, 32.18], 'Ощадбанк': [29.8, 32.18]}, 
    #     datetime.datetime(2022, 4, 23, 0, 0): {'Приватбанк': [29.255, 32.18], 'Ощадбанк': [29.8, 32.18]}, 
    #     datetime.datetime(2022, 4, 24, 0, 0): {'Приватбанк': [29.255, 32.18], 'Ощадбанк': [29.8, 32.18]}
    # }

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

vkudak-exchange-rates-0.0.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

vkudak_exchange_rates-0.0.4-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file vkudak-exchange-rates-0.0.4.tar.gz.

File metadata

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

File hashes

Hashes for vkudak-exchange-rates-0.0.4.tar.gz
Algorithm Hash digest
SHA256 572f07ec03e6c9ccf5ca30064f5dd5efc83f6f7e1a77a4edc24e46f20d0d04fb
MD5 f528295da29c954f7169eaab15e83b5c
BLAKE2b-256 b8b5b1d6364ec995f48b1ba36113f815ece06f2eb949ac01c4b086ec11003d3b

See more details on using hashes here.

File details

Details for the file vkudak_exchange_rates-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for vkudak_exchange_rates-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 116be594232cb1a6802be081cee729fee013bd77270bb793cec950f32ef98064
MD5 c19c7cabe90bc9ef37499b48a6b6e216
BLAKE2b-256 e33677e9b48958b3255908097ff51fe21c13f4582de0423ab88d65d274b5e68d

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