Database-backed append-only audit log. No Redis required — runs on SQLite, PostgreSQL, or MySQL.
Project description
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
Docs
MIT licensed; see NOTICE for third-party notices.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file firm_audit-0.1.0.tar.gz.
File metadata
- Download URL: firm_audit-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83085eb49d9de074b1f45979926846bc35820270f4a0379b190f8e529d1dad3f
|
|
| MD5 |
f972cd22e888d706b7b634734fe85051
|
|
| BLAKE2b-256 |
76af6a751e65ade3f1571e0ad09473439e3bdf0109af592e3180791f4c9972b7
|
File details
Details for the file firm_audit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: firm_audit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.27 {"installer":{"name":"uv","version":"0.11.27","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}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6d400d364c7eb21af07f51e5bb70fdf8e98292d7d31145d2891c1fdb2ed195a6
|
|
| MD5 |
29b6ef3d8da3558574eeeb4bd0de80c3
|
|
| BLAKE2b-256 |
80b46707227bbeffbf845562fe47c0fdadc1b6117d23db1874b0e19a81eb95cd
|