Python utilities for Tahu & Sparkplug B.
Project description
TahUtils
A small wrapper package for using Tahu for Sparkplug B in Python. Comes with an unmodified (barring import structure) Tahu included, hence the use of the Eclipse license.
Examples
See the examples directory in the project repository.
Current Support
- Generating Sparkplug B topics
- Generating birth, death, and data payloads for nodes (not tested for devices)
- Managing aliases
- Using enums for metric names
Goals
- Parse message handling
Updating Tahu Version
Assuming no major refactoring to the tahu library, updating the included tahu consists of the following steps:
-
Download the latest release from the repository: https://github.com/eclipse/tahu/tags
-
Extract the source code.
-
Regenerate the
sparkplug_b_pb2.pyfile per the instructions intahu-<version>/python/core/README.md. Usetahu-<version>/python/coreas your working directory when executing the command, and you'll need the protobuf compiler. -
Copy the contents of the
tahu-<version>/python/coredirectory to thetahutils/tahudirectory. -
Overwrite the
tahutils/tahu/__init__.pyfile with the appropriate imports, typically:from . import sparkplug_b_pb2 from . import array_packer from . import sparkplug_b
-
Modify the imports in
tahutils/tahu/sparkplug_b.pyto include thetahupackage name:import tahutils.tahu.sparkplug_b_pb2 as sparkplug_b_pb2 import time from tahutils.tahu.sparkplug_b_pb2 import Payload from tahutils.tahu.array_packer import *
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 Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tahutils-0.1.3.tar.gz.
File metadata
- Download URL: tahutils-0.1.3.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.1 Linux/6.5.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5ffbf1cf49feed2715e7183e2d05489f79b5f54835ecb1f350de122deff1479
|
|
| MD5 |
eca9b52299f4a151a075ff224ac62730
|
|
| BLAKE2b-256 |
04c01a13d148b8fe9af5b9af33604561950a063c082a9d41e6d3229714d2f695
|
File details
Details for the file tahutils-0.1.3-py3-none-any.whl.
File metadata
- Download URL: tahutils-0.1.3-py3-none-any.whl
- Upload date:
- Size: 17.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.1 Linux/6.5.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3eeb6bcc66420a2fa5d423beb4e55567ce63371c5b94a697914775cd230e7c5c
|
|
| MD5 |
466bdff7aa42fc35cc4073a577b1a790
|
|
| BLAKE2b-256 |
a07fe47a11dbf1d485cee4f090a039ceeb2d0868c97ab7d1998174d7d5ee5b70
|