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.upload(msg, chunked=True, chunk_size=2**16)
client.finalize_message(msg)
# получение квитанций
receipts = client.get_receipts(msg_id=msg.oid)
for rcpt in receipts:
client.download(rcpt)
Project details
Release history Release notifications | RSS feed
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.6.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for cbr_client-0.1.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d15d30889a557d3df5ceba57d00f49d214b9ab0c311b226701d2902a320d440c |
|
MD5 | 868072b1dce984c04a0b0094716a3d24 |
|
BLAKE2b-256 | 624cc558d5d515cb00db2f910d673054991e89bad3dc39df71ef710bcb93ed06 |