tpm_multicast_client
Listens to the TPM multicast stream and unpack the data into a status dictionary. This is a Python-only implementation of Jeff Hagen's tpmdgram.c.
Installation
To install with pip do
pip install sdss-tpm-multicast-client
To install from source do
pip install .
or, for development,
poetry install
More information on developing with Poetry can be found here.
Usage
The library provides a single function, listen_to_multicast, that creates a connection to the TPM broadcast, unpacks the datagram, and passes it to a callback function. A basic example
from pprint import pprint
from tpm_multicast_client import __version__, listen_to_multicast
def pprint_datagram(data: dict):
pprint(data)
async def main():
_, protocol = await listen_to_multicast(pprint_datagram)
await protocol.run_forever()
if __name__ == "__main__":
main()
The callback, pprint_datagram in this case, can be a function or a coroutine. In the former case it will be called with loop.call_soon(). In the latter the coroutine is scheduled as a task.
CLI
The library provides a simple CLI script tpm-multicast-client that prints the output of the datagram to stdout. It's basically equivalent to the example above.
Metadata
Release files for sdss-tpm-multicast-client 0.3.1
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 |
|---|---|---|---|---|
| sdss_tpm_multicast_client-0.3.1.tar.gz | 6.0 kB | Without provenance | Details for sdss_tpm_multicast_client-0.3.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sdss_tpm_multicast_client-0.3.1-py3-none-any.whl | Python 3 | none | any | Details for sdss_tpm_multicast_client-0.3.1-py3-none-any.whl |
Total release size: 14.2 kB
Release files / sdss_tpm_multicast_client-0.3.1.tar.gz
| Download URL | sdss_tpm_multicast_client-0.3.1.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb3052dcc838fc43699f4f856f517874156657fda00c2bcf7dce63991ef903dd
|
|
BLAKE2b-256 checksum How to use checksums |
8d964ec0aebfbe5c5cf550f905b1dcace5c90895462fbe0a258d0dcf1785e7b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / sdss_tpm_multicast_client-0.3.1-py3-none-any.whl
| Download URL | sdss_tpm_multicast_client-0.3.1-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2af843603ad2a39e6cfee6d42107f1824c650ab35dff5be45bc984768f392c2
|
|
BLAKE2b-256 checksum How to use checksums |
3253232b0872387dabbc81004f23ecc1bbe15f4aff46eb4cd252f38ad9212ebc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for sdss-tpm-multicast-client 0.3.1
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.