Compare commits
3
Commits
eb4aad68fc
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ecb387a467 | ||
|
|
89636040c6 | ||
|
|
201c112184 |
@@ -21,9 +21,9 @@ You probably want to use this tool using the cli-interface which tries to unders
|
|||||||
#### ./meuro.py 1000 meur 2055
|
#### ./meuro.py 1000 meur 2055
|
||||||
#### ./meuro.py 3.14E 01.02.2003 12:34
|
#### ./meuro.py 3.14E 01.02.2003 12:34
|
||||||
### For best Results:
|
### For best Results:
|
||||||
To reference the currencies use €, eur, euro, e, E, or µ, meu, meuro, m, M;
|
To reference the currencies use €, eur, euro, e, E or µ, meu, meur, meuro, m, M.
|
||||||
Currencies should be an integer or have 2 digits after the point (.).
|
Currencies should be an integer or have 2 digits after the point (.).
|
||||||
Dates should always be dd.mm.YYYY or dd.mm.yy
|
Dates should always be dd.mm.YYYY or dd.mm.yy.
|
||||||
If no date is supplied (or understood) the current date is used.
|
If no date is supplied (or understood) the current date is used.
|
||||||
## Python-API
|
## Python-API
|
||||||
You can also import this libary from another python file
|
You can also import this libary from another python file
|
||||||
|
|||||||
@@ -81,8 +81,10 @@ def reload(maxCacheSeconds=3600):
|
|||||||
|
|
||||||
def _loadYearsTableWeb():
|
def _loadYearsTableWeb():
|
||||||
print('[i] Fetching new data from ECB-Servers...')
|
print('[i] Fetching new data from ECB-Servers...')
|
||||||
url = 'https://sdw.ecb.europa.eu/quickviewexport.do?SERIES_KEY=122.ICP.M.U2.N.000000.4.ANR&type=csv'
|
#url = 'https://sdw.ecb.europa.eu/quickviewexport.do?SERIES_KEY=122.ICP.M.U2.N.000000.4.ANR&type=csv'
|
||||||
resp = requests.get(url)
|
#resp = requests.get(url)
|
||||||
|
url = 'https://data.ecb.europa.eu/download-api/csv/wide'
|
||||||
|
resp = requests.post(url, {'serieskeys': ['ICP.M.U2.N.000000.4.ANR']})
|
||||||
lines = resp.text.split('\n')[6:]
|
lines = resp.text.split('\n')[6:]
|
||||||
years = defaultdict(lambda: {m:1 + 0.02/12 for m in range(1,13)})
|
years = defaultdict(lambda: {m:1 + 0.02/12 for m in range(1,13)})
|
||||||
for line in lines:
|
for line in lines:
|
||||||
|
|||||||
Reference in New Issue
Block a user