This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Tools to query Bank of Russia

Project Description

https://github.com/idlesign/pycbrf

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'))
'''
Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pycbrf-0.1.0-py2.py3-none-any.whl (6.4 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jun 27, 2016
pycbrf-0.1.0.tar.gz (11.3 kB) Copy SHA256 Checksum SHA256 Source Jun 27, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting