layouts-cvm
Overview
Build, validate and serialise the files a fund sends to CVM, in CVM's own file layouts.
Features
- Pydantic models for 18 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-cvmwriters, pinned by a golden-file test. - Runtime dependencies:
pydanticandbeartype. 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 Diário V2 | InformeDiarioV2 |
InformeDiarioV2Document |
| 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 |
| Lâmina de Fundos V2 | LaminaV2 |
LaminaV2Document |
| 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
Useful Links
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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| layouts_cvm-0.1.2.tar.gz | 133.0 kB | With provenance | Details for layouts_cvm-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| layouts_cvm-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for layouts_cvm-0.1.2-py3-none-any.whl |
Total release size: 321.2 kB
Release files / layouts_cvm-0.1.2.tar.gz
| Download URL | layouts_cvm-0.1.2.tar.gz |
|---|---|
| Size | 133.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e234892b81d0486a0c03821c336fb114f3acb7ea4a741572ff011eebea42a126
|
|
BLAKE2b-256 checksum How to use checksums |
5f059a05ea59049f1429bf1bcede6a64f18d93279cfd2d9ba94b2d7d5c33d9a1
|
| 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 logRelease files / layouts_cvm-0.1.2-py3-none-any.whl
| Download URL | layouts_cvm-0.1.2-py3-none-any.whl |
|---|---|
| Size | 188.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4a2caf69b8896eea2a52984d48c52a8b5696939eaa639be6035bd6a867374673
|
|
BLAKE2b-256 checksum How to use checksums |
1c390ae6c9a5d0afe15ba7fad2c0eba5cc30bf2060cd974c19dfc92191dd0fa8
|
| 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 logSecurity for layouts-cvm 0.1.2
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.
Attestation for layouts_cvm-0.1.2.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 logA 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.