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 details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: privat-exchange-rates-0.0.2.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.5

File hashes

Hashes for privat-exchange-rates-0.0.2.tar.gz
Algorithm Hash digest
SHA256 f7aec571a7cd7dbaf1d9cf5c1f7579ee5ba752a9c03196a311bf737ee3235453
MD5 70601b114ee52a1e426c30622ac62a7d
BLAKE2b-256 117d3bacdb5489731ebebab1ea7a7533f1a973f47172f2657d9f822ae357b4ff

See more details on using hashes here.

File details

Details for the file privat_exchange_rates-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for privat_exchange_rates-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1189a79536049390cc1fb79fc505318ffe861b822da82a457b503c1596ac5a16
MD5 5eab5b20d08d23820f60707632fbb8f2
BLAKE2b-256 18502f1935e92107f51a4bfea08da0c68d1a8fa96421bcb452a98ab09c31cfb6

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