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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for vkudak_exchange_rates-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b596772ac7c53ef8aaefd425a0ac97418b40239f9f3dc67bfc71246e4b4095e1
MD5 2ce813c69cf87cd900c578e7b25f7acc
BLAKE2b-256 b3c35e2f679c176ce29488ce51e34e841e1c73a527d04e46c21a884cb2152bbf

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