Heisskleber
Project description
Heisskleber
🇩🇪Heißkleber m: "hot glue".
Heisskleber is a versatile library designed to seamlessly "glue" together various data producers and consumers across a multitude of protocols including zmq, mqtt, udp, serial, influxdb, and cmdline. With the ambition to extend into REST API interactions and file operations, Heisskleber offers both synchronous and asynchronous interfaces to cater to a wide range of IoT connectivity needs.
Features
- Multiple Protocol Support: Easy integration with zmq, mqtt, udp, serial, and cmdline. Future plans include REST API and file operations.
- Custom Data Handling: Customizable "unpacker" and "packer" functions allow for the translation of any data format (e.g., ascii encoded, comma-separated messages from a serial bus) into dictionaries for easy manipulation and transmission.
- Extensible: Designed for easy extension with additional protocols and data handling functions.
Installation
You can install Heisskleber via pip from PyPI:
$ pip install heisskleber
Quick Start
Here's a simple example to demonstrate how Heisskleber can be used to connect a zmq source to an mqtt sink:
"""
A simple forwarder that takes messages from a serial device and publishes them via MQTT.
"""
import asyncio
from heisskleber.serial import SerialSubscriber, SerialConf
from heisskleber.mqtt import MqttPublisher, MqttConf
async def main():
source = SerialSubscriber(config=SerialConf(port="/dev/ACM0", baudrate=9600))
sink = MqttPublisher(config=MqttConf(host="mqtt.example.com", port=1883, user="", password=""))
while True:
data, metadata = await source.receive()
await sink.send(data, topic="/hotglue/" + metadata.get("topic", "serial"))
asyncio.run(main())
All sources and sinks come with customizable "unpacker" and "packer" functions, making it simple to work with various data formats.
See the documentation for detailed usage.
License
Distributed under the terms of the MIT license, Heisskleber is free and open source software.
Issues
If you encounter any problems, please file an issue along with a detailed description.
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 heisskleber-1.0.2.tar.gz.
File metadata
- Download URL: heisskleber-1.0.2.tar.gz
- Upload date:
- Size: 96.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48c2aadc8d010e19c39acd499638ed9051ecca023eb9b83c405ff00487bf3937
|
|
| MD5 |
22e6c709b6f0d7f2f38a9abd5de7721e
|
|
| BLAKE2b-256 |
41dc25a01f78878cf055f10d3ef5ed808b884fa35470a68d10944ee28b3b6b29
|
File details
Details for the file heisskleber-1.0.2-py3-none-any.whl.
File metadata
- Download URL: heisskleber-1.0.2-py3-none-any.whl
- Upload date:
- Size: 30.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.5.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cda88ab158a110ec898e5b6b1c8863bb759608b982f9fbf9dba77b83c713dc29
|
|
| MD5 |
c8dc29fbe4a6373a6ce2a489248d1143
|
|
| BLAKE2b-256 |
541deadf2f63b1dbe15154273105205e1744d6ce1562bff7805cf8ec5f32349f
|