Skip to main content

https://github.com/idlesign/pycbrf

https://img.shields.io/pypi/v/pycbrf.svg https://img.shields.io/pypi/dm/pycbrf.svg https://img.shields.io/pypi/l/pycbrf.svg https://img.shields.io/coveralls/idlesign/pycbrf/master.svg https://img.shields.io/travis/idlesign/pycbrf/master.svg https://landscape.io/github/idlesign/pycbrf/master/landscape.svg?style=flat

Description

Tools to query Bank of Russia

Provides methods to get the following information:

  1. Exchange rates on various dates

Requirements

  • Python 2.7, 3.2+

Getting Exchange Rates

From command line:

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

From your application:

from pycbrf.toolbox import ExchangeRates


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

rates['USD']
'''
    ExchangeRate(
        id='R01235',
        name='US Dollar',
        code='USD',
        num='840',
        value=Decimal('65.5287'),
        par=Decimal('1'),
        rate=Decimal('65.5287'))
'''

Metadata

Release files for pycbrf 0.1.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 pycbrf 0.1.0
File Size Uploaded
pycbrf-0.1.0.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pycbrf 0.1.0
File Interpreter ABI Platform
pycbrf-0.1.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 17.7 kB

Release files / pycbrf-0.1.0.tar.gz

Download URL pycbrf-0.1.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
885623fb9f88a7e36ecc559259ff55b80635abe6d0074f07ecc44446a9576cf3
BLAKE2b-256 checksum
How to use checksums
3c11114da7df931170b0d002a29c605efe923103c2f99a0c5533e0a1e9612662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pycbrf-0.1.0-py2.py3-none-any.whl

Download URL pycbrf-0.1.0-py2.py3-none-any.whl
Size 6.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
ae5cbb418ca7944373ac10e9b3c111f6138b123876404d1eae241b960439df09
BLAKE2b-256 checksum
How to use checksums
e9ac295b07b65200097ae143d35015164849d090c09b4e9070a4eea1cfbea074
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.1.0

3 release files

1.0.1

3 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

This release

0.1.0 This release

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