readback
Validation via echo-confirmation. Send a value, read it back through a confirm function, and fail closed on mismatch — the classic command-then-verify pattern used in safety and control systems.
Install
pip install readback
Usage
from readback import readback, ReadbackError
sent = {"motor": "arm", "rpm": 1200}
confirmed = readback(sent, confirm_fn=lambda: {"motor": "arm", "rpm": 1200})
assert confirmed == sent
try:
readback(sent, confirm_fn=lambda: {"motor": "arm", "rpm": 0})
except ReadbackError as e:
assert e.expected == sent
assert e.got["rpm"] == 0
Roadmap
This is an early 0.1.0 release with active development planned:
- Tolerance / partial-match policies
- Async confirm functions
- Structured logging of mismatch traces
Author
Coldbricks — coldbricks@gmail.com
Metadata
Release files for readback 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 | Provenance | Actions |
|---|---|---|---|---|
| readback-0.1.0.tar.gz | 2.6 kB | Without provenance | Details for readback-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| readback-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for readback-0.1.0-py3-none-any.whl |
Total release size: 5.8 kB
Release files / readback-0.1.0.tar.gz
| Download URL | readback-0.1.0.tar.gz |
|---|---|
| Size | 2.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba9bd9efa80ce1b09666e27a5a75a67f3e3e103efccf21334f153f1260351053
|
|
BLAKE2b-256 checksum How to use checksums |
30550e8a30d98795d8e443ee64ea9f220b0fcc8ed9b45067c20bad48802bc356
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / readback-0.1.0-py3-none-any.whl
| Download URL | readback-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0cd11a704e35cb6608f30df6c6196c3d016ba87f2ec55ac65134eff49152278
|
|
BLAKE2b-256 checksum How to use checksums |
f05c3124efd5ee99c59593deffbabaff80e90b72286425edef7f07f8f2793211
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for readback 0.1.0
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.