Skip to main content

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)

Русский:

Библиотека для получения официальных курсов ЦБ на дату (для использования в расчетах деклараций и пр.).

Metadata

Release files for python-cbr 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-cbr 0.2.0
File Size Uploaded
python-cbr-0.2.0.tar.gz 2.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for python-cbr 0.2.0
File Interpreter ABI Platform
python_cbr-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.6 kB

Release files / python-cbr-0.2.0.tar.gz

Download URL python-cbr-0.2.0.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
031a8fc8a02fb0cdd1ab29143630bdff55135580b95cb2712af35f1551ab8aa1
BLAKE2b-256 checksum
How to use checksums
894b91f7abaad3665a6e92a8292351237e6d4b8865c6b555143d651e78669b6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release files / python_cbr-0.2.0-py3-none-any.whl

Download URL python_cbr-0.2.0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
14aa83cc2c57c49a347a9900d5a497086c3116bf795f74c2421832f769e6424a
BLAKE2b-256 checksum
How to use checksums
ab829d0696d6af6c2a137ac1a82a5b65b6524cfe2de63d39068e3b42d945732a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.7.7

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page