A small library for getting information on some currency exchange rates into UAH, on the selected date
Project description
Official Repo: https://gtlb.jetsoftpro.com/vkudak/vkudak-exchange-rates
It uses the following libraries:
- Requests for requests to exchange rates
- Pandas for greate html to table parse
- Matplotlib for plots
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vkudak-exchange-rates-0.0.3.tar.gz.
File metadata
- Download URL: vkudak-exchange-rates-0.0.3.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
164743f92357d9952f6290beff65e894ce1175b061ad9460640f6bf26471ea62
|
|
| MD5 |
73df9f056c329f9cdcb821df135c30f3
|
|
| BLAKE2b-256 |
ed3089d3a655230320202326e3117484da0acf28abdd8d8cb6629e2bcfb38ee3
|
File details
Details for the file vkudak_exchange_rates-0.0.3-py3-none-any.whl.
File metadata
- Download URL: vkudak_exchange_rates-0.0.3-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c05a81809f7f11acf21fd53a9114d493bb6bbf347eafef1910cb9465d1123562
|
|
| MD5 |
fa6c12ed12e8cc2243b3777435693e3a
|
|
| BLAKE2b-256 |
c9155ab170ce9d2c355da8cc84d102776d5ae48f0ccbd9d5690cf6b517151fea
|