Skip to main content

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)

Alt text

# 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])

Alt text

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fnw-0.0.2.tar.gz (102.8 kB view details)

Uploaded Source

Built Distribution

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

fnw-0.0.2-py3-none-any.whl (100.5 kB view details)

Uploaded Python 3

File details

Details for the file fnw-0.0.2.tar.gz.

File metadata

  • Download URL: fnw-0.0.2.tar.gz
  • Upload date:
  • Size: 102.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.6

File hashes

Hashes for fnw-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2e0fcc59e9a15121608fca58e27afd2c8292ec463cf9cf89b32bba9021cef116
MD5 91601c5b366ff6192878149c4d5b7598
BLAKE2b-256 1482abd04df2a9c7db731c949b54ca03c692c763346065f432ff1016546672d3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fnw-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 100.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.8.6

File hashes

Hashes for fnw-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a21953f0afc90404ff5fb96d02375c4ecd9e14a3838d09a3829b23d911694466
MD5 49ae984107ba56e4cf2bdb2f06058106
BLAKE2b-256 edbbbefab2698cfbba4ccca6772bbec9550024bfe51f3a018e45ee240d5af36a

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