Skip to main content

firm-audit

Database-backed, append-only audit log for Python. No Redis required: events are recorded in your existing SQLite, PostgreSQL, or MySQL/MariaDB database.

Part of firm, a port of the Rails 8 Solid stack — the audit module is original to firm (it has no Rails counterpart).

pip install firm-audit

Quickstart

from firm.audit import AuditLog

audit = AuditLog(database_url="postgresql://localhost/myapp")

audit.record("user.login", subject=("User", 42), actor=("User", 42), data={"ip": "10.0.0.1"})

for event in audit.history(subject=("User", 42)):
    print(event["action"], event["created_at"])

Highlights

  • Append-only — no update or delete API on recorded events
  • Structured querying with history() — filter by action, subject, actor, time range
  • Opt-in retention — nothing is trimmed unless you ask for it
  • Opt-in tamper-evidence — HMAC-signed rows, independent range seals, and a read-only verify that detects modification, deletion, insertion, or truncation by a keyless attacker

Docs

MIT licensed; see NOTICE for third-party notices.

Metadata

Release files for firm-audit 1.0.0

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

Source distribution (sdist)

Source distribution for firm-audit 1.0.0
File Size Uploaded
firm_audit-1.0.0.tar.gz 47.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for firm-audit 1.0.0
File Interpreter ABI Platform
firm_audit-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 101.7 kB

Release files / firm_audit-1.0.0.tar.gz

Download URL firm_audit-1.0.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ca30e768ebf8c6665cf36af2668236904824f046713d4bca75149bc4277e9df0
BLAKE2b-256 checksum
How to use checksums
b3e45731492fd8853fa7d68646362bbdbb38d701b1b7b05b9470a4dc97d96661
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / firm_audit-1.0.0-py3-none-any.whl

Download URL firm_audit-1.0.0-py3-none-any.whl
Size 54.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26d5b55376d8326023208d55f6c4fd652aabd0889df36f62e0c4be3990808316
BLAKE2b-256 checksum
How to use checksums
22933dfd835af65fa1b33310a10e2b847a374413158bac341add8d2356d36d7e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.31 {"installer":{"name":"uv","version":"0.11.31","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.1.0

2 release files

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