Skip to main content

Annex IV-as-Code CLI: generate & validate EU AI Act Annex IV

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.2.tar.gz (6.6 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.2-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for annex4ac-0.2.2.tar.gz
Algorithm Hash digest
SHA256 65e4504dcbda56f06709dc9ca301f515bcf36284066f7aebfd262d10c1023728
MD5 65ae0e05bf9a77cdb185d86fb10b9194
BLAKE2b-256 778b89f3491fdeb5fb00e0c246180752b42c8324c5549c47590304a4d7a70e53

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for annex4ac-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9bfce0e958de1b51c1da16b5f33d8be971ac73805014d8ccdc91852216b62514
MD5 c27b93094a01aaf8df288e6dd51b8b69
BLAKE2b-256 7c16bbd83ccc15f2095d1811c76f751a51309bc1a5f74a4374ef2105754a38ab

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