Skip to main content

pamoja-lora

Time-on-air, duty-cycle off-time, the regional channel plans a LoRa node must keep to, and the link budget that sets its range. One capability of pamoja, one memory-safe Rust core with bindings for TypeScript, Python, and C#.

read the guide documentation API reference

Install

pip install pamoja-lora
from pamoja import lora

This pulls in pamoja-native, the compiled engine. pip install pamoja is the whole framework in one package.

Example

The script the test suite runs, spliced here as it ran.

From bindings/python/guides/lora.py:

from pamoja.lora import messages_per_hour, plan_for

# EU863-870 numbers its data rates from the slowest. DR0 is SF12 at 125 kHz, the setting
# that reaches furthest and holds the channel longest.
plan = plan_for("EU868")
link = plan.link_settings(0)
print(f"{plan.name} DR0 is SF{link.spreading_factor} at 125 kHz")

# The time on air for that setting, coding rate 4/5, an eight-symbol preamble, an explicit
# header and CRC on, carrying a ten-byte reading.
airtime = link.airtime_us(10)
print(f"airtime   {airtime / 1e6:.2f} s for ten bytes")

# 868.1 MHz falls in a sub-band capped at 1% of the time and 16 dBm, so every transmission
# buys ninety-nine times its own length in silence.
channel = 868_100_000
permille = plan.duty_cycle_permille(channel)
print(f"channel   {permille} per mille duty cycle, {plan.max_eirp_dbm(channel)} dBm")

off_time = link.min_off_time_us(10, permille)
print(f"silence   {off_time / 1e6:.1f} s owed after each reading")

# The airtime plus that silence is what one reading really costs, which is the budget a
# deployment plans against.
print(f"budget    {messages_per_hour(link, 10, permille)} readings an hour")

# A frequency in no sub-band the plan describes has no duty cycle to budget against. That
# is a limit published elsewhere, not permission to transmit.
outside = plan.duty_cycle_permille(700_000_000)
elsewhere = (
    "in no sub-band of this plan, so its limit is published elsewhere"
    if outside is None
    else f"limited to {outside} per mille"
)
print(f"700 MHz   {elsewhere}")

The same capability in every language

Language Package Reference
Rust pamoja-lora reference, docs.rs, install
TypeScript @pamoja/lora reference, install
Python pamoja-lora reference, install
C# Pamoja.Lora reference, install

Documentation

License

MIT

Metadata

Release files for pamoja-lora 0.2.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 pamoja-lora 0.2.1
File Size Uploaded Provenance Actions
pamoja_lora-0.2.1.tar.gz 6.7 kB Without provenance Details for pamoja_lora-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pamoja-lora 0.2.1
File Interpreter ABI Platform Actions
pamoja_lora-0.2.1-py3-none-any.whl Python 3 none any Details for pamoja_lora-0.2.1-py3-none-any.whl

Total release size: 14.2 kB

Release files / pamoja_lora-0.2.1.tar.gz

Download URL pamoja_lora-0.2.1.tar.gz
Size 6.7 kB
Tags Source
SHA-256 checksum
How to use checksums
952a5ee101756e79aba4236d92b4086ecbd50a0a828c5409a0c14f6da03751d1
BLAKE2b-256 checksum
How to use checksums
64fe4d0d6e4dfda037daac74ebde8daf751e8abcdb9c7203765dbc706f197c39
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / pamoja_lora-0.2.1-py3-none-any.whl

Download URL pamoja_lora-0.2.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fb3f0f5820c3ea6ebfbf9429c776f17160022e1bca705e33bfeee9b60b69f55f
BLAKE2b-256 checksum
How to use checksums
7c4006bae3f07d3240c00a1674170eabf96880720af0f8382388cccd1676aff4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for pamoja-lora 0.2.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