Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

forge-mvc-audit

Journal d'audit applicatif opt-in pour Forge : tracer les actions importantes de l'application (élève créé, note modifiée, QCM corrigé, connexion, rôle changé, fichier supprimé) dans une table audit_log, avec une API explicite.

Périmètre volontairement borné : c'est un audit applicatif, pas un SIEM de cybersécurité. Cohérent avec ADR-008 : Forge fournit la table et le helper, la décision de tracer reste applicative.

Installation

pip install --pre forge-mvc-audit

En développement : pip install -e ./packages/forge-mvc-audit.

Mise en place de la table

forge audit:init        # copie la migration dans mvc/migrations/
forge migration:apply   # crée la table audit_log

Utilisation

from forge_mvc_audit import record_audit, get_audit_log

record_audit("eleve.cree", actor="prof.dupont", target_type="eleve", target_id=42)
record_audit("note.modifiee", actor="prof.dupont", target_type="note", target_id=7, details="12 -> 15")

for entree in get_audit_log(limit=20, actor="prof.dupont"):
    print(entree.created_at, entree.action, entree.target_type, entree.target_id)

L'API expose record_audit, get_audit_log, AuditEntry, plus AuditError, TABLE_NAME et MAX_LIMIT.

Périmètre

  • record_audit(action, *, actor, target_type, target_id, details, db) écrit une trace et renvoie son identifiant.
  • get_audit_log(*, limit, actor, action, target_type, target_id, db) relit les entrées récentes, filtrables (colonnes en liste blanche).
  • Hors périmètre : corrélation d'événements, alerting, rétention automatique, détection d'intrusion (ce n'est pas un SIEM).

Documentation complète : https://forgemvc.com/docs/forge/.

Release files for forge-mvc-audit 1.0.0rc8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forge-mvc-audit 1.0.0rc8
File Size Uploaded
forge_mvc_audit-1.0.0rc8.tar.gz 28.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for forge-mvc-audit 1.0.0rc8
File Interpreter ABI Platform
forge_mvc_audit-1.0.0rc8-py3-none-any.whl Python 3 none any Details

Total release size: 47.8 kB

Release files / forge_mvc_audit-1.0.0rc8.tar.gz

Download URL forge_mvc_audit-1.0.0rc8.tar.gz
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d911d5b8c9c75b74a6980dcffb6ec9621fc8790179ce00780cf50a0c7d3ca244
BLAKE2b-256 checksum
How to use checksums
bb71c9016744147ff29a92c7917db223e1124372864cda3ce7ca6b9b29d59c53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / forge_mvc_audit-1.0.0rc8-py3-none-any.whl

Download URL forge_mvc_audit-1.0.0rc8-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a970104bda03a6896c4caace6659e8dc1a5aceb46158ae4b38a44a105e964ad9
BLAKE2b-256 checksum
How to use checksums
fb94095d8261bd19d849abda7d39704b1aa93db65ea89d9ee180a74644686176
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page