Skip to main content

Heisskleber

Project description

Heisskleber

PyPI Python Version License

Read the documentation at https://heisskleber.readthedocs.io/ Tests codecov

pre-commit Format

🇩🇪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


Download files

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

Source Distribution

heisskleber-1.1.4.tar.gz (102.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

heisskleber-1.1.4-py3-none-any.whl (36.7 kB view details)

Uploaded Python 3

File details

Details for the file heisskleber-1.1.4.tar.gz.

File metadata

  • Download URL: heisskleber-1.1.4.tar.gz
  • Upload date:
  • Size: 102.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.10

File hashes

Hashes for heisskleber-1.1.4.tar.gz
Algorithm Hash digest
SHA256 461cf3100c2bacd7275e5ede4909b80d13c432c9f5043c2df7150bb194947078
MD5 60f4051dfb8d41fefbe52050d92e39cc
BLAKE2b-256 2a83c44584cf52d5f75194451c041769f4e7c2f46dbc017684720ecab7501a7f

See more details on using hashes here.

File details

Details for the file heisskleber-1.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for heisskleber-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 71657671bc93f43587c6e6042c7adb7d5bb9ff2d1bdd4de8e6fddc10c6f3f96e
MD5 65718b779d439b4c3ad2942564af7e9f
BLAKE2b-256 ab1517d9f1d5e5fb53b10b25f5297346e4fc6df2c711ebc7c09050498767d0a9

See more details on using hashes here.

Supported by

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