Skip to main content

PyNGHam library

Project description

PyNGHam

Overview

The PyNGHam library is a Python version of the original NGHam protocol library written in C by Jon Petter Skagmo (LA3JPA).

The original implementation and a further description of the protocol can be found here.

Dependencies

Installing

This library is available in the PyPI repository, and can be installed with the following command:

  • pip install pyngham

Or, directly from the source files:

  • python setup.py install

Documentation

The documentation page is available here. Instructions to build the documentation page are described below.

Dependencies

Building the Documentation

The documentation pages can be built with Sphinx by running the following command inside the docs folder:

  • make html

Usage Example

The usage of the library is pretty straightforward, after the initialization, there are two methods: one to encode a list of bytes, and other to decode a packet. Below there is a basic usage example:

from pyngham import PyNGHam

pngh = PyNGHam()

data = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

pkt = pngh.encode(data)

print("Encoded packet:", pkt)

pl, errors, errors_pos = pngh.decode(pkt)

print("Decoded data:", pl)
print("Number of errors:", errors)
print("Errors positions:", errors_pos)

More usage examples can be found in the documentation page.

License

This project is licensed under LGPLv3 license.

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

pyngham-1.0.0.tar.gz (17.8 kB view details)

Uploaded Source

File details

Details for the file pyngham-1.0.0.tar.gz.

File metadata

  • Download URL: pyngham-1.0.0.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.6

File hashes

Hashes for pyngham-1.0.0.tar.gz
Algorithm Hash digest
SHA256 cb9153ed20fa0f6a393aeff7730a5fe2be048b34d67227bc89448061b553ae2c
MD5 f6f284dcc870dd2336555516474c7d83
BLAKE2b-256 367ce73aab15eb0bbaa1b0710555c520a36d5409959808767d6d33b0a6a71042

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