Skip to main content

Python Dash7 ALP library

Project description

DASH7 Python Support

A collection of Python modules, supporting the DASH7 Alliance Protocol in general, and Sub-IoT in particular.

Introduction

This repository contains a collection of Python modules that can help when working with the Dash7 Alliance Wireless Sensor and Actuator Network Protocol.

Usage

Just pip install d7a, but we do recommend Rye

You can also manually clone this repo:

git clone https://github.com/Sub-IoT/pyd7a.git
cd pyd7a
rye sync --no-lock

Modules

ALP Parser

A parser/generator for Application Layer Protocol commands. From the specification:

ALP is the D7A Data Elements API. It is a generic API, optimized for usage with the D7A Session Protocol. It can be encapsulated in any other communication protocol. ALP defines a standard method to manage the Data Elements by the Application. Any application action, data exchange method or protocol is mapped into manipulation of D7A Data Elements and their properties by means of ALP Commands.

DLL Parser

A parser for D7AP frames as transmitted over the air.

Sub-Iot Serial console interface parser

A parser for frames used by the serial console interface by Sub-IoT-Stack nodes

Sub-IoT Modem interface

Allows to use a serial connected Sub-IoT-Stack node as a modem. By sending ALP commands you can access the node's filesystem, or use the node's DASH7 interface to access the filesystem of nodes in the network.

Examples

Can be found in 'examples' and 'tools' directories.

Gateway_hass

A gateway script for connecting a dash7 gateway to a running Home Assistant instance using MQTT.

Contributing

PyD7A uses Rye for dependency management.

Setting up Rye

Please refer to the Rye installation instructions.

You can also use [mise](https://mise.jdx.dev/)
mise plugin add rye https://github.com/Azuki-bar/asdf-rye.git
mise install rye
mise use rye
RYE_INSTALL_OPTION=--yes RYE_TOOLCHAIN=/usr/bin/python rye

Followed by:

source "$HOME/.rye/env"
Optionally add this your shell's profile
# bash
echo 'source "$HOME/.rye/env"' >> ~/.bashrc

# zsh
echo 'source "$HOME/.rye/env"' >> ~/.zprofile

Now, install the dependencies defined in pyproject.toml

rye sync

For more information, refer to the Rye guide

You can verify that the installation succeeded by running the unit tests:

rye test

If all tests ran without any errors, you're good to go.

Setting up your environment

PyD7A employs Ruff for code linting and formatting.

VSCode

The IDE of choice is VSCode. It has direct support for virtualenvs and an official extension for Ruff. In .vscode/settings.json, you fill find that autoformatting is done on save.

.vscode/extensions.json has a list of recommended extensions, but also one that is known to be problematic.

Pre-commit hooks

We also employ some pre-commit hooks to detect issues early on.

rye run pre-commit install

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

d7a-0.1.1.tar.gz (325.1 kB view details)

Uploaded Source

Built Distribution

d7a-0.1.1-py3-none-any.whl (111.0 kB view details)

Uploaded Python 3

File details

Details for the file d7a-0.1.1.tar.gz.

File metadata

  • Download URL: d7a-0.1.1.tar.gz
  • Upload date:
  • Size: 325.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for d7a-0.1.1.tar.gz
Algorithm Hash digest
SHA256 99d34edf2d870a9abcd5c415e156819cab45ffad4d4c293cae5e8d8932246f9d
MD5 3949e48c39356d9b1bd39b6596a462e7
BLAKE2b-256 03b050e9e862a9925c8f75e393d0113f12fe0e3b25e2f25bcaf847055dd29744

See more details on using hashes here.

File details

Details for the file d7a-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: d7a-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 111.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.9

File hashes

Hashes for d7a-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5df3c9a47c99f209e9b1b788afabffd633029fc6df32e0afa1c30e594cbb54a2
MD5 caa538172b5bc8b15dda1e21b6f68cd7
BLAKE2b-256 a5bd9d7f467555169bff36b99c6dd2e8c05cc31c7a05b3df53ed6a1a8e81ec97

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