Fiddling-with-minfin-0.0.1
توضیحات
A small library for getting info about Ukrainian banks
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | Fiddling-with-minfin-0.0.1 |
| نام | Fiddling-with-minfin |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Solohub Illia |
| ایمیل نویسنده | illa98994@gmail.com |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/Fiddling-with-minfin/ |
| مجوز | MIT |
# 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
نیازمندی
| مقدار | نام |
|---|---|
| ==2021.10.8 | certifi |
| ==3.0.4 | chardet |
| ==2.0.12 | charset-normalizer |
| ==0.11.0 | cycler |
| ==4.33.3 | fonttools |
| ==4.0.0rc1 | googletrans |
| ==0.9.0 | h11 |
| ==3.2.0 | h2 |
| ==3.0.0 | hpack |
| ==2021.12.1 | hstspreload |
| ==0.9.1 | httpcore |
| ==0.13.3 | httpx |
| ==5.2.0 | hyperframe |
| ==2.10 | idna |
| ==1.4.2 | kiwisolver |
| ==4.8.0 | lxml |
| ==3.5.1 | matplotlib |
| ==1.22.3 | numpy |
| ==21.3 | packaging |
| ==1.4.2 | pandas |
| ==9.1.0 | Pillow |
| ==3.0.8 | pyparsing |
| ==2.8.2 | python-dateutil |
| ==2022.1 | pytz |
| ==2.27.1 | requests |
| ==1.5.0 | rfc3986 |
| ==1.16.0 | six |
| ==1.2.0 | sniffio |
| ==1.26.9 | urllib3 |
نحوه نصب
نصب پکیج whl Fiddling-with-minfin-0.0.1:
pip install Fiddling-with-minfin-0.0.1.whl
نصب پکیج tar.gz Fiddling-with-minfin-0.0.1:
pip install Fiddling-with-minfin-0.0.1.tar.gz