tiny_pacs_audit
Append-only audit trail for tiny_pacs: records who did what — every incoming association (accepted and rejected), every service request (C-STORE/-FIND/-MOVE/-GET, Storage Commitment) and every administrative change — into a single table in the shared database.
What it provides
The AuditLog component — an observer that subscribes to the core association-lifecycle, service and AuditRecord events and writes one append-only row per audited action (time, device, user, peer, action, status and a JSON details blob). It is insert-only and publishes no mutation events for its own records.
The tiny-pacs audit query|stats|cleanup subcommands for offline inspection and retention of the trail.
It depends on the core only: attribution comes from the core association context and the session field of the service payloads, and administrative actions arrive through the core AuditRecord event emitted by whatever component performs the mutation — the audit extension never imports the admin or identity packages.
Failure isolation
The component is an observer: an audit failure must never affect DICOM service. Every handler on the DICOM path swallows and logs exceptions and returns the neutral result of its event, and records dropped after a locked SQLite database is retried once are logged at ERROR.
Installation
pip install tiny-pacs-audit
or with the convenience extra:
pip install tiny_pacs[audit]
Installing the extension never changes server behaviour: the component stays disabled until enabled in the configuration.
Configuration
components:
AuditLog:
on: true
retention_days: 0 # 0 = keep forever; >0 purges on startup
record_details: true # false stores only the fixed columns
The administration commands work offline against the configured database. Administration against SQLite requires a file-based database — set db_name and mode: rwc on the Database component (the in-memory default cannot persist data between command invocations):
components:
Database:
on: true
db_name: pacs.db
mode: rwc
Querying the trail
tiny-pacs audit query --category assoc --limit 50
tiny-pacs audit query --event rejected --aet MODALITY --format json
tiny-pacs audit query --user alice --since 2024-01-01T00:00:00
tiny-pacs audit stats
tiny-pacs audit cleanup --older-than 90
Privacy
Detail blobs never contain passwords or keys: the DICOM user identity sub-item is summarized as type + username and its secondary field is never read, and v1 details carry UIDs and counts only — no patient attributes. Retention and audit cleanup are the deletion path.
Documentation
See the Audit log tutorial in the tiny_pacs documentation.
Metadata
Release files for tiny-pacs-audit 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tiny_pacs_audit-0.1.0.tar.gz | 16.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tiny_pacs_audit-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.3 kB
Release files / tiny_pacs_audit-0.1.0.tar.gz
| Download URL | tiny_pacs_audit-0.1.0.tar.gz |
|---|---|
| Size | 16.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fcf82ba53cab27a2e510e12b3b032c22fbf81663d113563a9bd8a091e21cff7
|
|
BLAKE2b-256 checksum How to use checksums |
7506c66417ec7d80c194133acdbe168552af34e820de7dcc90034d022a5cb17e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency logRelease files / tiny_pacs_audit-0.1.0-py3-none-any.whl
| Download URL | tiny_pacs_audit-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f686ce7d80d692b911d34b594838ff29e352638cf3772a106d3b25b5c1911946
|
|
BLAKE2b-256 checksum How to use checksums |
f1e91f1924ef9af933c6e9dd49ad289fbd871afe84a41c1472f437fc018c447d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 4, 2026.
Transparency log