Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sdss_tpm_multicast_client-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distributions

sdss_tpm_multicast_client-0.1.0-cp312-cp312-manylinux_2_17_x86_64.whl (45.0 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

sdss_tpm_multicast_client-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (45.4 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sdss_tpm_multicast_client-0.1.0-cp311-cp311-manylinux_2_17_x86_64.whl (31.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

sdss_tpm_multicast_client-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (31.9 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sdss_tpm_multicast_client-0.1.0-cp311-cp311-macosx_12_0_x86_64.whl (4.6 kB view details)

Uploaded CPython 3.11 macOS 12.0+ x86-64

sdss_tpm_multicast_client-0.1.0-cp310-cp310-manylinux_2_17_x86_64.whl (18.0 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

sdss_tpm_multicast_client-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (18.5 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

sdss_tpm_multicast_client-0.1.0-cp310-cp310-macosx_12_0_x86_64.whl (4.6 kB view details)

Uploaded CPython 3.10 macOS 12.0+ x86-64

File details

Details for the file sdss_tpm_multicast_client-0.1.0.tar.gz.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0b985c430b51d4672ca833db714ed5c7192ae4871823d4d613bd5d4c55695fe6
MD5 8b876b2d812f8a43541cc24abda8c6b1
BLAKE2b-256 1aa9ad748926410db2f3ecaaec22e2c6eee3810907ee126d5553068164c4170c

See more details on using hashes here.

File details

Details for the file sdss_tpm_multicast_client-0.1.0-cp312-cp312-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0-cp312-cp312-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 e86474f3137aa423da1f8307837a698977326199feb1cfbfd8c612cb32807210
MD5 46b02973c48d565e5964e36a2329ddb3
BLAKE2b-256 2f65fdd29925f9ba3888f2f14eba74c50a10993c62458c3c32ff77fc24d98fc2

See more details on using hashes here.

File details

Details for the file sdss_tpm_multicast_client-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b24f98f9500b632344cdb387e77b162f7f04c1727034d18c29e648cab52f57d0
MD5 8e90befcabe638d87d774a8e140f95b2
BLAKE2b-256 0b238ace9bf61012ce671f6c882dae54e8faf4ae042bf619c62f6288f42d0500

See more details on using hashes here.

File details

Details for the file sdss_tpm_multicast_client-0.1.0-cp311-cp311-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0-cp311-cp311-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 183746eb1a8ede79b85c328114c9041f2e242c212cd5d3fe8fd1e6a9b26c20ed
MD5 da1a759c6f3b5812e9fe33388cbb3d5b
BLAKE2b-256 80add02723feaf4e6e3ea1f113a48617e5916691c6dfb152a93dc39d554fad7f

See more details on using hashes here.

File details

Details for the file sdss_tpm_multicast_client-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 683872b7cee5862d303fda6858f6c1d11890c791fbc993ac94c19d5809632186
MD5 84fc925358fa53029823bb99fc8f0ae5
BLAKE2b-256 f06c7d70299375e03599aef54228cf0577bdab607df2d84c59ae998c1b8ba269

See more details on using hashes here.

File details

Details for the file sdss_tpm_multicast_client-0.1.0-cp311-cp311-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0-cp311-cp311-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 dc2bc1383d6c0880d95f471480deb2e2428520281dab95b4cbf66853ee7286d6
MD5 83b8dbefa30ffb9b704476c9dcb3ba48
BLAKE2b-256 71bd2d912c668e2a95040f38630f6f3c81848a516dcbf1f68285e5e9c121b0d8

See more details on using hashes here.

File details

Details for the file sdss_tpm_multicast_client-0.1.0-cp310-cp310-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0-cp310-cp310-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 9dbb984655431afa87fcdf39661eea078236b709ad055cd5b371fc47adefb0f5
MD5 adae803c5c1e265111e35ea9bb3feb5a
BLAKE2b-256 9df71d704ea0b041b9447a528159dc781df51181f1b66239dd4f235c4bf59a0b

See more details on using hashes here.

File details

Details for the file sdss_tpm_multicast_client-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5fa2df48e299440294e816a00ae1faa5abd10f8f2591e53b9525da6e34daf76e
MD5 7b11d4285077eb4218bb52f03eeac925
BLAKE2b-256 ed5c8e8a7d70cdb1b647a7ae27e92206a4560dc1a3626c7048b267fc513ac98b

See more details on using hashes here.

File details

Details for the file sdss_tpm_multicast_client-0.1.0-cp310-cp310-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for sdss_tpm_multicast_client-0.1.0-cp310-cp310-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 18f4495c1dc3abebbcb7013632a909eaa81124acede94609b12af4d408b3fa39
MD5 dadce3bc133ea9dd182d59d6d2b0aff9
BLAKE2b-256 6710023430e65a0cef2ae3aa582e608e3d3af7cfc535416d16046570cdbc81f1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page