Skip to main content

Annex IV-as-Code CLI

Project description

Annex IV‑as‑Code (annex4ac)

Generate and validate EU AI Act Annex IV technical documentation straight from your CI.

100% local by default.

SaaS/PDF in the Pro tier.


✨ Features

  • Always up‑to‑date – fetches the latest Annex IV text from the AI Act Explorer every run.
  • Schema‑first – YAML skeleton mirrors the 13 required sections.
  • Fail‑fast CI – exits 1 when mandatory fields are missing.
  • Freemiumfetch_schema & validate are free; generate (PDF) unlocks with a licence key.
  • One‑line GitHub Action – block pull requests that break compliance.

🚀 Quick‑start

# 1 Install (Python 3.9+)
pip install annex4ac

# 2 Pull the latest Annex IV layout
annex4ac fetch_schema -o annex_template.yaml

# 3 Fill in the YAML → validate
cp annex_template.yaml my_annex.yaml
$EDITOR my_annex.yaml
annex4ac validate -i my_annex.yaml   # "Validation OK!" or exit 1

# 4 (Pro) Generate the PDF
echo "ANNEX4AC_LICENSE=your_key" >> ~/.bashrc
annex4ac generate -i my_annex.yaml -o docs/annex_iv.pdf

Hint : You only need to edit the YAML once per model version—CI keeps it green.


🗂 Required YAML fields

Key Corresponds to Annex IV §
system_overview  1 «General description»
intended_purpose  2
system_architecture  3
development_process  4
data_specifications  5
performance_metrics  6
risk_management  7
post_market_plan  8 (only high‑risk)
human_machine_interface  9
changes_and_versions  10
records_and_logs  11
instructions_for_use  12
compliance_declaration  13

🛠 Commands

Command What it does
fetch_schema Download current Annex IV HTML, convert to YAML scaffold annex_schema.yaml.
validate  Validate your YAML against the Pydantic schema & Rego rules. Exits 1 on error.
generate Render PDF via Jinja2 → XeLaTeX (Pro).

Run annex4ac --help for details.


🐙 GitHub Action example

name: AnnexIV gate
on: [pull_request]

jobs:
  ai-act-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - run: pip install annex4ac
      - run: annex4ac validate -i spec/model.yaml

To use the Pro license in CI, add ANNEX4AC_LICENSE as an encrypted repository secret.


⚙️ Local development

git clone https://github.com/your‑org/annex4ac
cd annex4ac
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
pytest                     # unit and opa tests
python annex4ac.py --help

TinyTeX (Linux/Mac)

curl -sL https://yihui.org/tinytex/install-unx.sh | sh
export PATH="$HOME/.TinyTeX/bin/x86_64-linux:$PATH"

🔑 Licensing & pricing

  • Community (free) – validate in CI, unlimited public repos.
  • Pro €15/mo – PDF generation, version history (SaaS), email support.
  • Enterprise – self‑hosted Docker, SLA 99.9 %, custom sections.

Pay once, use anywhere: CLI, GitHub Action, REST (coming soon).


📚 References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

annex4ac-0.2.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

annex4ac-0.2.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file annex4ac-0.2.0.tar.gz.

File metadata

  • Download URL: annex4ac-0.2.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for annex4ac-0.2.0.tar.gz
Algorithm Hash digest
SHA256 eefba34b1bd3b1efca4ca20ada997e65e21a26be1da9440b2170a4e9fd4adcf4
MD5 8acddf8e0a60afd07193990a84319bd0
BLAKE2b-256 8ebe52319bb39e3c012952a4fc74b0b13142587e8afa5300993ad4e9ab3f8830

See more details on using hashes here.

File details

Details for the file annex4ac-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: annex4ac-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for annex4ac-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ceb4b11795b2044bc33675177cb910dcf7282cb28b57ac3bff1fb051e6962ac4
MD5 cdb4f907565217e34a2265145078a82e
BLAKE2b-256 01af8a6f791416ed50f245fa6764271f718f8930bc4b5542fc77c693c6018567

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page