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 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.3.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.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: annex4ac-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 f07dcc397088fc026c9cef61094b3b6e11c5f6ab35c50b9847035db41ae72fa2
MD5 bd13b9768761ab71d6343af4a722331d
BLAKE2b-256 c6b94adc3a667c2c06312bc4f80f1d6223e4df254d8972091c05cdc89d89c0e9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: annex4ac-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 463c57cb0541524f70bae76c29044027f8f773e1975a06cf38c89c82cb85d931
MD5 5010e554d27d16676f1c8761b0bf8735
BLAKE2b-256 4ec02eecdd7bf181a33143b6d45907c7b4efe968a56d39a4c8a12185da849b38

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