A small library for getting info about Ukrainian banks
Project description
Retrieval of info about currency rates in Ukranian banks
Frankly speaking it was a real hassle, but I made it somewhat working
Quick functional description:
# converts currency into a numeric code(do not ask me about it NBU says it is called "r030")
print(get_numeric("USD"))
#output: 840
# opposite of the previous one
print(get_alph(978))
# output: EUR
# gets info about all banks on this page : https://minfin.com.ua/
print(print(ask_minfin('USD',(2022,3,11))))
# output:
2022-03-11
[{'bank': 'PrivatBank', 'r030': 840, 'cc': 'USD', 'rate': 29.255, 'date': '11.03.2022'}, {'bank': 'Raiffeisen Bank', 'r030': 840, 'cc': 'USD', 'rate': 29.25, 'date': '11.03.2022'}, ...)
# does the same stuff prevoius one does but return date for a period
print(ask_minfin_period("USD",(2015,3,4),(2021,4,5)))
# output:
a gigantic list of lists of dicts
# these two just save .json and .csv files correspondingly
save_json("mm.json",ask_minfin_period("USD",(2015,11,2),(2021,1,2)))
save_csv("mm.csv",ask_minfin_period("USD",(2015,11,2),(2021,1,2)))
# the most fun there:
(plotable() is required removes data that is not present in all dicts i.e. ensure that the data is valid for plotting)
banks=["BTA Bank","PrivatBank"]
plot_data([i for i in plotable(ask_minfin_period("USD",(2015,11,2),(2021,1,2))) if i["bank"] in banks])
# it will plot a graph of values per year of banks you specify (please do not throw all of them in, it is a mess then)
# the same stuff but per month
banks=["BTA Bank","PrivatBank"]
plot_data([i for i in plotable(ask_minfin_period("USD",(2015,11,2),(2021,1,2),by='month')) if i["bank"] in banks])
Features
- do not know, maybe a simple caching to speed up the process a little cause I had to use translator to translate from Ukrainan names of banks, and it was taking quite a time, so I decided to help it a little
- maybe something else, do not remember
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
Built Distribution
Close
Hashes for Fiddling_with_minfin-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 344524b095b5284a7001628588114b5a3352ea253deac38a5483ae65d6cfdb71 |
|
MD5 | 4a4a68e35ed49bcfc558beb34db42596 |
|
BLAKE2b-256 | d818b1190a9cdd805dc857379a95e90821b3086ab201e31cd443ce37fbe6b783 |
Close
Hashes for Fiddling_with_minfin-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 434ffef20d90c4d15da1fad99fadfa537708dbf12454384cf397dc7cabfa34b5 |
|
MD5 | 74a50c2c997d45ee23eee2fc2404253e |
|
BLAKE2b-256 | 7de3fe0c2ffd73dde251f9e9aeea9e4c6a1944fd18245953679832ae8a15cc7e |