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.0rc6

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.0rc6
File Size Uploaded
forge_mvc_audit-1.0.0rc6.tar.gz 16.4 kB Details

Built distribution (wheel)

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

Total release size: 29.3 kB

Release files / forge_mvc_audit-1.0.0rc6.tar.gz

Download URL forge_mvc_audit-1.0.0rc6.tar.gz
Size 16.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1fa224f52773ff0fc87247fd3df060facc84f2818e4018393f2ab33441ca9eaa
BLAKE2b-256 checksum
How to use checksums
b00dacf0306093dab7fde2025be05dea7b32f9363b74937d5b71ea54af97d638
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.0rc6-py3-none-any.whl

Download URL forge_mvc_audit-1.0.0rc6-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f210ebd3a1e45f982e1031d5d468c7701653f03f94a50d182aea0b1f45fbac1a
BLAKE2b-256 checksum
How to use checksums
6b0fc5476f6dd3a46474d7488bacbeb5cea074d3c5d0c2d2bd220e6c93fba464
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