Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Tools to query Bank of Russia

Project description


Tools to query Bank of Russia

Provides methods to get the following information:

  1. Exchange rates on various dates
  2. Banks information (requisites, codes, numbers, etc.)


  • Python 2.7, 3.4+
  • requests Python package
  • dbf_light Python package
  • click package for CLI



$ pycbrf --help

$ pycbrf rates
$ pycbrf rates -d 2016-06-26 -c USD

$ pycbrf banks
$ pycbrf banks -b 045004641

CLI requires click package to be installed. Can be installed with pycbrf using:

$ pip install pycbrf[cli]


from pycbrf import ExchangeRates, Banks

rates = ExchangeRates('2016-06-26', locale_en=True)

rates.date_requested  # 2016-06-26 00:00:00
rates.date_received  # 2016-06-25 00:00:00
rates.dates_match  # False
# Note: 26th of June was a holiday, data is taken from the 25th.

# Various indexing is supported:
rates['USD'].name  # US Dollar
rates['R01235'].name  # US Dollar
rates['840'].name  # US Dollar

        name='US Dollar',

banks = Banks()
bank = banks['045004641']
bank.swift  # SABRRUMMNH1
bank.corr  # 30101810500000000641

bank_annotated = Banks.annotate([bank])[0]
for title, value in bank_annotated.items():
    print('%s: %s' % (title, value))

Project details

Download files

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

Files for pycbrf, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size pycbrf-0.4.0-py2.py3-none-any.whl (12.8 kB) File type Wheel Python version 2.7 Upload date Hashes View hashes
Filename, size pycbrf-0.4.0.tar.gz (2.3 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page