TPM multicast client
Project description
tpm_multicast_client
Listens to the TPM multicast stream and unpack the status dictionary using Jeff Hagen's tpmdgram
code.
Installation
To install with pip
do
pip install sdss-tpm-multicast-client
To install from source do
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.
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 Distributions
Hashes for sdss_tpm_multicast_client-0.1.0b1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d0e63ebc061f7efaf982c9424f78c848e87b5f2d00af15ea8de2dba7087e812 |
|
MD5 | 406bf93de444430cbc172e0dbfa75e3c |
|
BLAKE2b-256 | 165e860c41d7bd61486e2aa3d9f2f0ee6f34f84d99260a43ef9eee74e946908d |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp312-cp312-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b38fbc69f11cb83b1d4a64a4d4928954be1d4da7e48302b5b7f5471bfd6d1cef |
|
MD5 | f7f708b0b1c14f41afde5e2e907ceeaf |
|
BLAKE2b-256 | 79af6ecdfb735650cef9bcc3543633328f0265e75ec81da547e04ff641c41e52 |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d04658cf3618428414ef29ec5a914c396d4b2aa91e3c8481d657ed879617221 |
|
MD5 | 56397d67af0c41296ea11692b44b53ab |
|
BLAKE2b-256 | 74f2e69a6502080c36a945c7d688085ff7636e851974d0ec165b377a7f136597 |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22390a4e019a5b67f03599f4dd621f099a2d9bb61a911e0f1e1d4cb63af007c2 |
|
MD5 | ace459fcf5c83dfe30264d245aee50bc |
|
BLAKE2b-256 | 1c45a662fd509bb95e9d218bc84fb054c96156da2489b21290bb4ba5454d9a4d |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dadb792e848d07a073d14ef819b293bb40975f7cc91cff3fab102bd55aa051c5 |
|
MD5 | 8f5710f619773b13d79bd814f7fb6fe8 |
|
BLAKE2b-256 | 45b9d35ece6012686cf4e74e9f675adc2fbc8f6cb06e04200c651aa3a58c5635 |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74b698d5a1b4f5cd1914a50c19119119daf4a04b03a1ac0a86a41ff676ba9663 |
|
MD5 | 8b53871ca2e0ceed95b807afbf7239c2 |
|
BLAKE2b-256 | 1f559f861ec86f79039f48f452cfdcddb6460fbe38b651586193d6a563a6506d |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1639919a9692b14d7664a1615fffbd684090d6c0c5454f8d889ffb8e8a4044be |
|
MD5 | 4205490cf69d870c0ae154f09df6f07c |
|
BLAKE2b-256 | e3be9d887e35892727792ee7010fce6f03bfcc84d2f518c5162961a5d5e2cd17 |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 000aa93cc6f440e070cc1c8ae16bf0e96cbd91b4925808f202c5fde696c42ecd |
|
MD5 | f445a1778ee5e857b9b21f13889a503c |
|
BLAKE2b-256 | bbc07f1cfb790eeffc0300c0b6267121ca07f8a1f63e7e3a18feab990498808c |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 29a47f1a93f5cb320324e4a5148283006a3b133a46883c77b5fd11af117ac7bf |
|
MD5 | 7fafd06c4b4b79771eefcb2641c24d87 |
|
BLAKE2b-256 | 2a3a643cbfc18d296303fbf52cce0a0b2136c59d00054e274f87300e2a65c9a1 |
Hashes for sdss_tpm_multicast_client-0.1.0b1-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 687860577a3bbff6372834d0463edf58ddfe02be40e457f2aeb4c33f5d0a2113 |
|
MD5 | 0436e0d8a648e213831212922dcd497d |
|
BLAKE2b-256 | 705f5dafcca02af20c753ef3209bf3ef12968835cd6f8bfdbdfd650af1788769 |