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.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f0601c2ad2ce09548466857e778e0c14ab57c04eac1a170ac45bc38f6dd12c25 |
|
MD5 | e3f802f0d6ac332b48cc98192b59ab22 |
|
BLAKE2b-256 | 29bc74842121335c0b8bc44bc64e1a2ccbebf0882235ac4feb963dccfcd26a8f |
Hashes for sdss_tpm_multicast_client-0.1.1-cp312-cp312-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e2116ccb096abafdbb6ca5df354bd5447f58a8a0642f09a7a4db7b2ecfca6e6 |
|
MD5 | b712b206376e16664ac08eda9527e066 |
|
BLAKE2b-256 | 84e14f4cbbd9c1d5763ec931ebeecdaa3b5457a8a81cf2179d7604ad3af29c6d |
Hashes for sdss_tpm_multicast_client-0.1.1-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3372a5bbfd7d2f6499a8d9a8ed2a84a190344123b3426a714d2c1dd270cedc98 |
|
MD5 | 44928ad669f9fdc821f18ee26c9e8f0d |
|
BLAKE2b-256 | 88af0a442b484d53682b7a911fb036efc3304a68522e96d25a25bf34388aa257 |
Hashes for sdss_tpm_multicast_client-0.1.1-cp312-cp312-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c02cd07b28cd54f2c9a21bb8555f3add01f2092dc6383ad3325cdf528ad50756 |
|
MD5 | 625f0f04ad6985e3a6dfcff50fdde061 |
|
BLAKE2b-256 | f5cd10b39ea5db0b57273a35476ec4cca54c2c2907d4f34ff0249072e28307a7 |
Hashes for sdss_tpm_multicast_client-0.1.1-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e941f9dca2dacb008e7872efd736cbf90ff61828d407520b45ca62eac88650d |
|
MD5 | d26fe8221b06d0ab34a2ea679f749581 |
|
BLAKE2b-256 | 795654bbb249b46a32cce0efc3b845ffb8dbabf07e80b9b9e0088e9f3863a3e8 |
Hashes for sdss_tpm_multicast_client-0.1.1-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 050ede822b1bf71f01d072209119ab5954b168b954b22e266deb43f8e5ea3739 |
|
MD5 | 83bf359d6884696b7a0c3bf32ee5ed7d |
|
BLAKE2b-256 | 0f924db73946451f42b2a2f8f277a18e258e906ade726e31a79e888a584d81fe |
Hashes for sdss_tpm_multicast_client-0.1.1-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75c3a86ca0af0a5fab5d5933d40ffdbc196c0e5b33612254ae3701623e73aea7 |
|
MD5 | 92de097e52ba1247e913bec586f60a52 |
|
BLAKE2b-256 | d459a463646289f3239628fcea6177b3abcfeb495899ed7e76425189f4fa829f |
Hashes for sdss_tpm_multicast_client-0.1.1-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2f81b150432634570bb3f0672f6b97e005b4d8ae3490641c84db84effc452f9 |
|
MD5 | d68600c5ff915ed8857f0f8bacf75191 |
|
BLAKE2b-256 | 4d3e7b36fde0638074649fddd064a721df3e9f9ed4848dd7e094d495f5561d70 |
Hashes for sdss_tpm_multicast_client-0.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d8396109688a5c68fabcc573a7ce1e8dfdb6aed3b66003b50cb603a1fa76a9b |
|
MD5 | 4ee5e0508b70e346ac073067c764db08 |
|
BLAKE2b-256 | 5a0021c04d5f54f279c180432f5a7d8032a6098892a3b103bece1e441e8effbc |
Hashes for sdss_tpm_multicast_client-0.1.1-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7cecbb4603b6466b21ca82eb34f0835fe4627bf4bca7a555ceacda1cb05ebaf2 |
|
MD5 | 810a9005164bbc7cd7f82fbbbf47fcbe |
|
BLAKE2b-256 | 0cd66ac9a879a30043d9d642fcc15045ef32acf9614c31acd044057333c5035c |