A small library for getting information on cash exchange rates of PrivatBank and the NBU on the selected date
Project description
Official Repo: https://gtlb.jetsoftpro.com/mariana.drozd/exchange_rates_mariana_drozd
It uses the following libraries:
- Requests for requests to exchange rates
- Pandas for working with tables
- Matplotlib for plots
Quick Install / Usage
pip install exchange_rates_mariana_drozd
from datetime import datetime
from exchange_rates_mariana_drozd import get_exchange_rates_from_date_to_date
def main():
exchange_rates_from_date_to_date = get_exchange_rates_from_date_to_date(
datetime(day=15, month=4, year=2019),
datetime(day=20, month=4, year=2019),
currency="USD",
save_to_csv_file=False,
save_to_json_file=False,
show_plot=False
)
print(exchange_rates_from_date_to_date)
# Output:
# {
# "15.04.2019": {
# "date": "15.04.2019",
# "bank": "PB",
# "baseCurrency": 980,
# "baseCurrencyLit": "UAH",
# "exchangeRate": [
# {
# "baseCurrency": "UAH",
# "currency": "UZS",
# "saleRateNB": 0.003243,
# "purchaseRateNB": 0.003243
# },
# {
# "baseCurrency": "UAH",
# "currency": "BYN",
# "saleRateNB": 12.64203,
# "purchaseRateNB": 12.64203
# },
# {
# "baseCurrency": "UAH",
# "currency": "TMT",
# "saleRateNB": 7.774029,
# "purchaseRateNB": 7.774029
# },
# ...
Note:
If you need to save data in CSV or/and JSON file, set needed parameter (save_to_csv_file
and/or save_to_json_file
) to "True".
Also, if you want to see plot of selected currency, set show_plot
to "True"
Example of USD currency plot:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for exchange-rates_mariana_drozd-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d0d26fd7d53d2f2d739771e0caec8a36c9a4e3a7c448376d0722f1ee57b7f37 |
|
MD5 | ad9a1a70ba7f8ed22a6a431f95ee196c |
|
BLAKE2b-256 | 5b31a0c5e3b883878e652c2de66376422fa5ce93614e6966c68c58b152d06e02 |