Tool for format-logistic control of reports sent to RosStat
Project description
РосСтат ФЛК
Инструмент для форматно-логического контроля отчетности, отправляемой в РосСтат.
Документация описывающая формат отчетности и контроли - Приказ РосСтата от 28.10.2010 №372
Список изменений - CHANGELOG
Установка
pip install rosstat-flc
Зависимости
Использование
from rosstat.flc import parse_schema, parse_report
# На вход передаются ElementTree, Element, bytes, file name/path, или file-like объекты
schema = parse_schema('xml_schema.xml')
report = parse_report('xml_report.xml', skip_warns=True)
for result in schema.validate(report):
print(result)
# {'code': '4.30', 'name': 'Проверка контролей', 'message': 'XML Подраздел 2 стр. 201-202 гр.3 = "1" или "2", при хотя бы одной из стр. 105,106,108,109 гр.3 = 1; слева 1.0 <= справа 0.0 разница 1.0', 'tip': True}
# {'code': '4.60', 'name': 'Проверка контролей', 'message': 'XML Подраздел 2 стр. 203 гр. 3 = "1" или "2", или "3", или "4", или "5", или "6", при хотя бы одной из стр. 105,106,108,109 гр.3 = 1; слева 1.0 <= справа 0.0 разница 1.0', 'tip': True}
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
rosstat-flc-0.7.3.tar.gz
(20.1 kB
view hashes)
Built Distribution
Close
Hashes for rosstat_flc-0.7.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6288a473b332fc6fb41aeb07e72520ebf8685d3e20308c3773f21363bd3f26f5 |
|
MD5 | 9c7f2d459e9d9fb6a773f37b7e367572 |
|
BLAKE2b-256 | ab6bf4980cf40d6b8ceb02c0234459d12b525f847d8b3ec2dcf20337ca4ae3b0 |