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, influxdb, and cmdline. Future plans include REST API and file operations.
  • Custom Data Handling: Customizable "unpack" and "pack" 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.
  • Synchronous & Asynchronous Versions: Cater to different programming needs and scenarios with both sync and async interfaces.
  • Extensible: Designed for easy extension with additional protocols and data handling functions.

Installation

You can install Heisskleber via pip from PyPI:

$ pip install heisskleber

Configuration files for zmq, mqtt and other heisskleber related settings should be placed in the user's config directory, usually $HOME/.config. Config file templates can be found in the config directory of the package.

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
"""

from heisskleber.serial import SerialSubscriber, SerialConf
from heisskleber.mqtt import MqttPublisher, MqttConf

source = SerialSubscriber(config=SerialConf(port="/dev/ACM0"))
sink = MqttPublisher(config=MqttConf(host="127.0.0.1", port=1883, user="", password=""))

while True:
    topic, data = source.receive()
    sink.send(data, topic="/hostname/" + topic)

All sources and sinks come with customizable "unpack" and "pack" functions, making it simple to work with various data formats.

It is also possible to do configuration via yaml files, placed at $HOME/.config/heisskleber and named according to the protocol in question.

See the documentation for detailed usage.

Development

  1. Install poetry
curl -sSL https://install.python-poetry.org | python3 -
  1. clone repository
git clone https://github.com/flucto-gmbh/heisskleber.git
cd heisskleber
  1. setup
make install

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-0.5.3.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

heisskleber-0.5.3-py3-none-any.whl (38.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: heisskleber-0.5.3.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/6.7.5-200.fc39.x86_64

File hashes

Hashes for heisskleber-0.5.3.tar.gz
Algorithm Hash digest
SHA256 65fe5c2285b636e9fcde78050ad43bb0d292a9b4d1377a1f95aee94758a21ffe
MD5 8a2463cfbaa7c3d47e33aca3706d65f6
BLAKE2b-256 37785ff41c25ed9f85d9e2a5d6a47087c43d31fb7dd99963a6efc3946a1b532d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: heisskleber-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 38.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.13 Linux/6.7.5-200.fc39.x86_64

File hashes

Hashes for heisskleber-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6e1aecf6bc0ddddbc8dedbeb5f27a13219654cbfd046f93a24773bd0b5fab34b
MD5 2cdbd7463d5a9e15fe7838b128a6462f
BLAKE2b-256 847054eb68b8983982e45f38a3f790a66b958e51dbbaa1944e537c1ed367b6e6

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