Skip to main content

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

Project description

PyPI - Python Version

Official Repo: https://github.com/ValentynKhoroshchak/privat-exchange-rates

It uses the following libraries:

  • Requests for requests to exchange rates

Quick Install / Usage

pip install privat_exchange_rates
from datetime import datetime

from privat_exchange_rates import get_exchange_rates


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

    print(exchange_rates)
    # Output:
    # {
    #     'date': '21.04.2022',
    #     'bank': 'PB',
    #     'baseCurrency': 980,
    #     'baseCurrencyLit': 'UAH',
    #     'exchangeRate': [{
    #         "baseCurrency": "UAH",
    #         "currency": "AUD",
    #         "saleRateNB": 12.8319250,
    #         "purchaseRateNB": 12.8319250
    #     }]
    # }

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

privat-exchange-rates-0.0.2.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

privat_exchange_rates-0.0.2-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page