Read the official exchange rates data from cbr.ru
Project description
CBR
Provides functionality to get official CBR (Central Bank of Russia) exchange rates. Typical usage often looks like this:
#!/usr/bin/env python
from cbr import get_exchange_rates
get_exchange_rates('15.05.2010')
get_exchange_rates('13.01.2020', codes=['840', '978'])
get_exchange_rates('13.01.2020', code='840')
get_exchange_rates('13.01.2020', symbols=['USD', 'EUR'])
get_exchange_rates('13.01.2020', symbol='JPY')
Result is array like this:
[{'code': '392', 'symbol': 'JPY', 'amount': 100, 'rate': Decimal('55.9098')}]
(Note amount column, it's not always 1)
Русский:
Библиотека для получения официальных курсов ЦБ на дату (для использования в расчетах деклараций и пр.).
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
python-cbr-0.2.0.tar.gz
(2.2 kB
view hashes)
Built Distribution
Close
Hashes for python_cbr-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14aa83cc2c57c49a347a9900d5a497086c3116bf795f74c2421832f769e6424a |
|
MD5 | 5986a005fd005ecbf4a9a706f83cfb6b |
|
BLAKE2b-256 | ab829d0696d6af6c2a137ac1a82a5b65b6524cfe2de63d39068e3b42d945732a |