Skip to main content

Rosstat FLC 2

PyPI - License PyPI - Python Version


Инструмент для форматно-логического контроля отчетности, отправляемой в Росстат (ФСГС).

Документация, описывающая формат отчётности, структуру элементов шаблона и язык описания контролей - Приказ Росстата от 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('schema.xml')
report = parse_report('report.xml', alerts=True)

for result in schema.validate(report):
    print(result)

# {'code': '4.30', 'name': 'Проверка контролей', 'description': 'XML Подраздел 2 стр. 201-202 гр.3 = "1" или "2", при хотя бы одной из стр. 105,106,108,109 гр.3 = 1; слева 1.0 <= справа 0.0 разница 1.0', 'level': 1}
# {'code': '4.60', 'name': 'Проверка контролей', 'description': 'XML Подраздел 2 стр. 203 гр. 3 = "1" или "2", или "3", или "4", или "5", или "6", при хотя бы одной из стр. 105,106,108,109 гр.3 = 1; слева 1.0 <= справа 0.0 разница 1.0', 'level': 1}

Результат проверки всегда список. При успешной проверке список будет пустой.

Если на одном из этапов проверки будут выявлены ошибки, проверка будет прервана и вернутся все ошибки обнаруженные на этом этапе.

С блоками проверок их порядком и описанием ошибок можно ознакомиться здесь.

Флаг alerts определяет будут ли выводится предупреждения о пропуске контролей с проверками за прошлый период (эти проверки невозможно реализовать не имея доступа к ранее сформированному отчёту).

Поле level в результатах означает уровень проверки. 1 - ошибка, 0 - предупреждение.

Metadata

Release files for rosstat-flc 2.0.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 rosstat-flc 2.0.0
File Size Uploaded Provenance Actions
rosstat_flc-2.0.0.tar.gz 21.3 kB Without provenance Details for rosstat_flc-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rosstat-flc 2.0.0
File Interpreter ABI Platform Actions
rosstat_flc-2.0.0-py3-none-any.whl Python 3 none any Details for rosstat_flc-2.0.0-py3-none-any.whl

Total release size: 54.2 kB

Release files / rosstat_flc-2.0.0.tar.gz

Download URL rosstat_flc-2.0.0.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ed20528c55e23893134ea5fdbc836bdd53e0640d3cff7f07d4459825aeb0ee4c
BLAKE2b-256 checksum
How to use checksums
b5aacecfabe39f4554dc075a9d98e43923fc31561d75d843ae7f60e0079a2ab8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / rosstat_flc-2.0.0-py3-none-any.whl

Download URL rosstat_flc-2.0.0-py3-none-any.whl
Size 32.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85f355183216e3b31b2ef1af5d3487fb756036a5c690fa2ebc1860aa3ef1ca24
BLAKE2b-256 checksum
How to use checksums
926ee95db990b4d57a5588c1cc9a95df8049e65f995d8467d7a2c663ad78ff6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Security for rosstat-flc 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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