CSVExporter for spreadsheet-compatible output and JSONExporter for structured data interchange. Both implement the AuditExporter protocol and can be used interchangeably.
AuditExporter Protocol
The base protocol that all exporters implement.Import
Signature
CSVExporter
Export audit entries as CSV. Nested dict fields (likemetadata) are JSON-serialized.
Import
Constructor
Default Columns
When no custom columns are provided, the following fields are exported:Example
JSONExporter
Export audit entries as a JSON array. Supports pretty-printing with configurable indentation.Import
Constructor
Example
Custom Exporters
You can implement theAuditExporter protocol to create custom exporters:
Audit Trail
How audit entries are created and stored
CLI Audit
Export and verify audit logs from the command line