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 unlocks with a licence key .


✨ Features

  • Always up‑to‑date – every run pulls the latest Annex IV HTML from the official AI Act Explorer.
  • Schema‑first – YAML scaffold mirrors the 9 numbered sections adopted in the July 2024 Official Journal.
  • Fail‑fast CIannex4ac validate exits 1 when a mandatory field is missing, so a GitHub Action can block the PR.
  • Zero binaries – ReportLab renders the PDF; no LaTeX, no system packages.
  • Freemiumfetch-schema & validate are free; generate (PDF) requires ANNEX4AC_LICENSE.

🚀 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 (June 2024 format)

Key Annex IV §
system_overview  1
development_process  2
system_monitoring  3
performance_metrics  4
risk_management  5
changes_and_versions  6
standards_applied  7
compliance_declaration  8
post_market_plan  9

🛠 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. Exits 1 on error.
generate Render PDF with pure‑Python ReportLab (Pro tier).

Run annex4ac --help for full CLI.


🐙 GitHub Action example

name: Annex IV 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

Add ANNEX4AC_LICENSE as a secret to use PDF export in CI.


⚙️ 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 tests
python annex4ac.py --help

🔑 Licensing & pricing

Tier Price Features
Community Free fetch-schema, validate, unlimited public repos
Pro €15 / month PDF generation, version history (future SaaS), email support
Enterprise Custom Self‑hosted Docker, SLA 99.9 %, custom sections

Pay once, use anywhere – CLI, GitHub Action, future REST API.


📚 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.3.1.tar.gz (8.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.3.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: annex4ac-0.3.1.tar.gz
  • Upload date:
  • Size: 8.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.3.1.tar.gz
Algorithm Hash digest
SHA256 01879a42d3604904731074fbe4193d74f573701e01f314a646b85910cf7536a3
MD5 9bc9ae62b050b7488621b04813c33076
BLAKE2b-256 40b5c28031d4dec7b4198526756768efee510e2265b4f751ec50fde45f7f2469

See more details on using hashes here.

File details

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

File metadata

  • Download URL: annex4ac-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 8.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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fc5b2b3cb67cacc8715b40974ca43b1224a0513cc015c720d2131d8aaa606ac3
MD5 000b9a9e3c9455ded880d1c0ce86cecd
BLAKE2b-256 ad196ee01a70c29090a45978e5ffad7a1586bf6d1830df837d0ce1f70df2f742

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