Skip to main content

Tool for easy working with https://portal5.cbr.ru API

Project description

cbr-client

Клиент для работы с api ЦБ РФ

Описание АПИ - https://cbr.ru/lk_uio/guide/rest_api/

Установка

pip install cbr-client

Зависимости

Использование

from cbr_client import Client

client = Client(url='https://portal5test.cbr.ru/back/rapi2', 
                login='test', 
                password='test', 
                user_agent='test app')

files = [
        ('report.zip.enc', 'encrypted report content'),
        ('report.zip.enc.1.sig', 'operator signature'),
        ('report.zip.enc.2.sig', 'client signature')
    ]

# отправка отчета на портал ЦБ
msg = client.create_message(files, '1-ПИ')
client.upload(msg)
client.finalize_message(msg)

# получение квитанций
receipts = client.get_receipts(msg_id=msg.oid)
for rcpt in receipts:
    client.download(rcpt)

Project details


Download files

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

Source Distribution

cbr-client-0.1.5.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

cbr_client-0.1.5-py3-none-any.whl (5.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page