ai-act-inventory
A small Python library for building and maintaining an AI Act / GDPR AI
System Inventory & Risk Register — the same document previously maintained
as a hand-built Excel workbook (AI_Act_GDPR_AI_System_Inventory_and_Risk_Register.xlsx),
now backed by a reusable data model and generator.
What it does
- Data model (
ai_act_inventory.models):AISystemandRiskAssessmentdataclasses mirroring the inventory and risk sheets.RiskAssessmentcomputes the AI Act risk category, base risk score, regulatory tier multiplier, final risk score and risk level in pure Python — the same formulas that live in the Excel sheet, so you can query/filter/report on your register without opening Excel. - Workbook generator (
ai_act_inventory.workbook.build_workbook): renders any list ofAISystem/RiskAssessmentobjects into the same styled workbook (Instructions, AI System Inventory, Risk Assessment, Dashboard with live charts, hidden Lists sheet with drop-downs) as the original template. The Risk Assessment sheet's derived columns stay live Excel formulas, so rows added by hand in Excel keep auto-calculating. - I/O (
ai_act_inventory.io): load/save systems and risks as JSON or CSV, so the register can be version-controlled or edited outside Excel. - CLI (
ai-act-inventory): generate the workbook from the command line.
Install
cd Work/AI_Act_Inventory
python3 -m venv .venv # if not already created
source .venv/bin/activate
pip install -e ".[dev]"
CLI usage
# Generate the workbook straight from the 9 built-in example systems
ai-act-inventory build --output register.xlsx
# Start your own register from the examples, then edit the JSON files
ai-act-inventory init --data-dir ./data
# ... edit ./data/systems.json and ./data/risks.json ...
ai-act-inventory build --data-dir ./data --output register.xlsx
Library usage
import datetime
from ai_act_inventory import AISystem, RiskAssessment, build_workbook
system = AISystem(
system_id="AI-010",
system_name="Invoice OCR Extractor",
acquisition_type="Developed In-House",
ai_act_role="Provider",
business_owner="Finance",
description="Extracts line items from scanned supplier invoices.",
ai_technique="Computer Vision",
)
risk = RiskAssessment(
system_id="AI-010",
annex_iii_domain="None",
severity=2, likelihood=2, scale_reach=2, vulnerability=1, autonomy=3, data_sensitivity=1,
mitigation_measures="Human review of extracted totals before posting.",
risk_owner="Finance Manager",
next_review_date=datetime.date(2027, 1, 1),
)
print(risk.risk_category, risk.final_risk_score, risk.risk_level)
# Minimal Risk 1.83 Low
build_workbook([system], [risk], "register.xlsx")
Tests
pytest
Legacy script
build_workbook.py is the original standalone script this library was
extracted from; it is kept for reference but superseded by
ai_act_inventory.workbook.build_workbook and the ai-act-inventory CLI.
Metadata
Release files for ai-act-inventory 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ai_act_inventory-0.1.0.tar.gz | 27.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ai_act_inventory-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.0 kB
Release files / ai_act_inventory-0.1.0.tar.gz
| Download URL | ai_act_inventory-0.1.0.tar.gz |
|---|---|
| Size | 27.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ff876df87d63c753966b2e1a3a1a0441f9b58d80f3f685172c39afbba3b4672
|
|
BLAKE2b-256 checksum How to use checksums |
9ebd39f8036d92a845097633ea8358e4c40f36da982e3aa25e124aff48761ba5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Release files / ai_act_inventory-0.1.0-py3-none-any.whl
| Download URL | ai_act_inventory-0.1.0-py3-none-any.whl |
|---|---|
| Size | 27.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b5ee1bebe2c62910c131be3db448b037c27482f1f1c718df203f9c73946beeb
|
|
BLAKE2b-256 checksum How to use checksums |
06346d4cf5daa188324c73d54ee643f45f90600fab3e1033bde1bcc926e5309e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.6
|
Security for ai-act-inventory 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.