Skip to main content

A package to decode data encoded in the CayenneLPP format.

Project description

Python-CayenneLPP

Lint/Test codecov PyPI PyPI

Introduction

Open-source library for python to decode CayenneLPP format payload. The Cayenne Low Power Payload (LPP) provides a convenient and easy way to send data over LPWAN networks such as LoRaWAN. More details on CayenneLPP payload: https://github.com/myDevicesIoT/cayenne-docs

Note: while Python versions 2.7 and <=3.7 may work, they're not officially supported since they're EOL.

Installation

To install the package use next pip command

pip install python-cayennelpp

Usage

To decode payload simply use method decode() from this package

>>>from python_cayennelpp.decoder import decode
>>>print(decode('03670110056700FF'))
[{'channel': 3, 'name': 'Temperature Sensor', 'value': 27.2}, {'channel': 5, 'name': 'Temperature Sensor', 'value': 25.5}]

Additional info

The package may raise following exceptions:

  • TypeError - if the provided data is not of the str type
  • ValueError - if the provided data length is not equal to the expected

Note: if the package receives a wrong sensor type the intermediate result of the decoder will be returned, error printed to the stdout, but KeyError exception will not be raised

Download files

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

Source Distribution

python_cayennelpp-0.1.0.tar.gz (41.8 kB view details)

Uploaded Source

Built Distribution

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

python_cayennelpp-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file python_cayennelpp-0.1.0.tar.gz.

File metadata

  • Download URL: python_cayennelpp-0.1.0.tar.gz
  • Upload date:
  • Size: 41.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for python_cayennelpp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 51db944cf6ae28f7d490631975ab0df6501974f902bbc0631d97aae52255e34d
MD5 8e01d695363df9af98624c43b6d63839
BLAKE2b-256 e2b03ef9e74122be58100b63971bf6b12f046edd6de996fa03cf910d41dda3bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_cayennelpp-0.1.0.tar.gz:

Publisher: release.yml on OlegZv/Python-CayenneLPP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file python_cayennelpp-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for python_cayennelpp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa1c5343b2c8fe3a7d1a5d920fcd8f39aacbc88f61e52d277936fcc60f03a181
MD5 3fe3a0f8ceb0b3d62e93c310d426e871
BLAKE2b-256 85f15e46d4686e7f3b9da6d5b17c04bdb0ed20f4615b089bdbedf2c3f53a61c2

See more details on using hashes here.

Provenance

The following attestation bundles were made for python_cayennelpp-0.1.0-py3-none-any.whl:

Publisher: release.yml on OlegZv/Python-CayenneLPP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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