T-Record
A lightweight Python library for robust record tracing, status tracking, and detailed logging — built for automation pipelines and data integrity.
Features
ThoughtfulRecord model Track each record’s status, lifecycle, and traces with robust JSON-serializable objects.
Automatic history Dumps detailed logs, merges previous runs seamlessly, preserving full audit history.
Enhanced HTML reports Auto-generates beautiful HTML reports with status summary, traces, diffs, and screenshots.
Portable archive Packs all data (logs + images + HTML) into a shareable ZIP file.
Fail-safe logging Internally uses try/except to ensure tracing never crashes your main process.
Installation
Install via pip:
pip install t-record-lib
Or for local development:
git clone https://github.com/YOUR_ORG/t_record.git cd t_record pip install -e .
Quickstart
from t_record.record import configure_records_tracing, ThoughtfulRecord, dump_records, pack_sharable_zip, RecordStatus
# 1. Configure
configure_records_tracing("records_folder")
# 2. Create your record
class MyRecord(ThoughtfulRecord):
id: str
status: RecordStatus = ""
record = MyRecord(id="rec_001")
# 3. Change status or add traces
record.status = Status.RUNNING
record.log_trace("Started processing", reason="Data loaded")
# 4. Save everything
dump_records()
# 5. Create shareable ZIP
pack_sharable_zip("records.zip")
Output files
By default, each run will produce:
/records_folder/{process_name}/{run_id}/
records_logs.json # full structured logs (merged from previous runs)
records_report.html # human-readable dashboard
/images/ # attached screenshots
Plus a zip archive on demand.
Advanced usage
Continue an existing run (merges history automatically):
configure_record_tracing("records_folder") record = MyRecord(id="rec_001") # picks up previous traces record.status = Status.COMPLETED dump_records()Add an image trace:
record.log_trace("Reviewed", reason="Visual QC", image="path/to/image.png")
Metadata
Release files for t-record-lib 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| t_record_lib-0.3.2.tar.gz | 22.1 kB | Without provenance | Details for t_record_lib-0.3.2.tar.gz |
Release files / t_record_lib-0.3.2.tar.gz
| Download URL | t_record_lib-0.3.2.tar.gz |
|---|---|
| Size | 22.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
335264a639cf420138c63f8b5f1b6d25b4e92947fff16653515cfc3746fdf5bc
|
|
BLAKE2b-256 checksum How to use checksums |
37ec6e2349a4aa5a47f2c5d7bf14c15a3664f22c9b466456155df5d85115e410
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.5
|
Security for t-record-lib 0.3.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.