Thanks for your interest in improving vendus. This project follows a strict quality
bar. The full developer guide — architecture, conventions, and the live-verified API
facts — is on the docs site:
https://vendus.bilouro.com/contributing/.
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pre-commit installruff check .
ruff format --check .
mypy src/
pytest # coverage ≥85% enforced
mkdocs build --strict # if you touched docs-
Unit (
tests/unit/,respxmocks) run by default and assert the exact wire body, not just the return value. -
Live integration (
tests/integration/) hit the real Vendus API. They are excluded frompytestand auto-skip without credentials:export VENDUS_API_KEY=... # a test/demo account key export VENDUS_REGISTER_ID=... # GET /v1.1/registers/ or the Vendus backoffice pytest -m integration --no-cov
They run in test mode (non-fiscal documents). Use a dedicated test/demo account.
Validate the wire shape against the real API before claiming an operation works — the
Vendus reference docs can be incomplete. The hard-won facts (e.g. an FR needs payments,
an NC credits a real original, FT/FR/NC can't be cancelled, and mode inherits the
register's mode — tests on new accounts) are documented on the
contributing page.
- The contributing guide — architecture, conventions, document types, live-verified facts
src/vendus/services/documents.py— reference implementationtests/unit/test_documents.py— wire-body test pattern
See the docs guide: enum →
_build_X_body → create_X / create_X_async (thread self._effective_mode(mode)) →
live-validate → unit tests (wire body) → example → doc page (EN + PT) →
CHANGELOG.md.