Skip to main content

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.

Contributing instructions are also available here.

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.

Metadata

Release files for pyngham 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyngham 1.1.1
File Size Uploaded Provenance Actions
pyngham-1.1.1.tar.gz 19.2 kB Without provenance Details for pyngham-1.1.1.tar.gz

Release files / pyngham-1.1.1.tar.gz

Download URL pyngham-1.1.1.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
99a8638f3ad9352157cfad95c3f6b2ab249b4e4ad96f2817a7516be76bb01c98
BLAKE2b-256 checksum
How to use checksums
c1274d542856f73f48e8fbe5901172bdd2cc328aeebb9aeeafe59f71e4f38e84
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.11.1

Security for pyngham 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page