Skip to main content

layouts-cvm

CVM emblem

Project Status: Active Python Version PyPI Version Snyk Vulnerabilities Snyk License PyPI Downloads PyPI Docs Linting Mypy Test Coverage License Open Issues Contributions Welcome

Overview

Build, validate and serialise the files a fund sends to CVM, in CVM's own file layouts.

Features

  • Pydantic models for 16 CVM XML layouts, validated before anything is serialised.
  • One writer per layout (export(doc, output_path=None)), producing windows-1252 XML.
  • Byte-identical to the original filings-cvm writers, pinned by a golden-file test.
  • Runtime dependencies: pydantic and beartype. No network.
Layout Writer Document
Atualização do Cadastro de Ativos CadastroAtivos CadastroAtivosDocument
CDA V4 Cda CdaDocument
CDA V3 CdaV3 CdaV3Document
Extrato das Informações sobre o Fundo V3 Extrato ExtratoDocument
Informe de Fundo 157 InfFundo157 InfFundo157Document
Informe Mensal FIDC (ICVM 576) InfMensalFidc InfMensalFidcDocument
Informe Diário V4 InformeDiario InformeDiarioDocument
Informe Diário V3 InformeDiarioV3 InformeDiarioV3Document
Informe de Portabilidade InformePortabilidade InformePortabilidadeDocument
Informe Quadrimestral V2 InformeQuadrimestral InformeQuadrimestralDocument
Informe Trimestral V1 InformeTrimestralV1 InformeTrimestralV1Document
Informe Mensal de Investidor Não Residente InrMensal InrMensalDocument
Lâmina de Fundos V3 Lamina LaminaDocument
Perfil Mensal V4 PerfilMensal PerfilMensalDocument
Perfil Mensal (original) PerfilMensalOriginal PerfilMensalOriginalDocument
Perfil Mensal V3 PerfilMensalV3 PerfilMensalV3Document

Documentation

The documentation site lives at https://guilhermegor.github.io/layouts-cvm/. Serve it locally with bash bin/poe_exec.sh docs_serve.

Getting Started

Python 3.10+ is the only prerequisite; bin/venv.sh installs Poetry when it is missing.

Install

git clone https://github.com/guilhermegor/layouts-cvm.git
cd layouts-cvm
bash bin/venv.sh
bash bin/poe_exec.sh init

poe lives inside the virtualenv, so bin/venv.sh creates it first; bin/poe_exec.sh then runs poe init without activating anything. Once the virtualenv exists, poetry run poe init does the same.

Usage

from layouts_cvm import InformeDiario, InformeDiarioDocument

doc = InformeDiarioDocument.model_validate(dict_payload)
xml = InformeDiario().export(doc)                      # returns the XML text
InformeDiario().export(doc, "informe_diario.xml")      # or writes it, atomically

Each layout has its own page under the Layouts section of the documentation.

Project Structure

layouts-cvm/
├── .github/        workflows, CODEOWNERS, PR template
├── .specs/         feature specs and backlog trackers
├── bin/            gate scripts and helpers
├── docs/           published documentation
├── src/            application code
├── tests/
│   ├── unit/
│   └── integration/
├── pyproject.toml
└── poe_tasks.toml  task runner entry points

Development

After the bootstrap under Install, any task can be run with the bootstrap script: bash bin/poe_exec.sh <task>, and bash bin/poe_exec.sh with no task lists them.

bash bin/poe_exec.sh unit_tests
bash bin/poe_exec.sh integration_tests

Once the first release's docs deploy has created the gh-pages branch, run bash bin/poe_exec.sh enable_pages once: until that branch exists, init leaves Pages untouched.

Public API

The public surface is whatever the package __init__.py lists in __all__; everything under _internal/ is private.

Publishing

Releases go out from the release workflows under .github/workflows/; the git tag is the version.

The path from 0.x to 1.0.0, and the release gate that guards it, is in docs/releasing-1-0-0.md.

Contributing

See CONTRIBUTING.md for the branch, commit and review rules.

License

This project is licensed under MIT; see LICENSE.

Authors


Generated from the lib-minimal template via BlueprintX. Unofficial, community library. Not affiliated with or endorsed by the Comissão de Valores Mobiliários (CVM); the emblem is theirs and is not covered by this project's MIT license.

Metadata

Release files for layouts-cvm 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for layouts-cvm 0.1.1
File Size Uploaded Provenance Actions
layouts_cvm-0.1.1.tar.gz 130.5 kB With provenance Details for layouts_cvm-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for layouts-cvm 0.1.1
File Interpreter ABI Platform Actions
layouts_cvm-0.1.1-py3-none-any.whl Python 3 none any Details for layouts_cvm-0.1.1-py3-none-any.whl

Total release size: 312.4 kB

Release files / layouts_cvm-0.1.1.tar.gz

Download URL layouts_cvm-0.1.1.tar.gz
Size 130.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4460060f59dea89b5f1de29c8249a08c95ed5b8b6efc00444daf4307e3041b99
BLAKE2b-256 checksum
How to use checksums
d1dc98395b7d706bcb2b1361a1647820f2052a7552e45b98d699f70886eae73d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / layouts_cvm-0.1.1-py3-none-any.whl

Download URL layouts_cvm-0.1.1-py3-none-any.whl
Size 181.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e4372adb04a3390ef2c2ccc5f77a3b7c657fa70c21977166c28042a8914d0a3e
BLAKE2b-256 checksum
How to use checksums
8681e6345d0c1841060330a126ac0f10a6277720556004f457cc539787ba73d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for layouts-cvm 0.1.1

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for layouts_cvm-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

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