Skip to main content

pamoja-core (Python)

Python bindings for the pamoja device SDK core, built with PyO3 and maturin.

The generated surface is intentionally thin. A hand-written, idiomatic layer is added on top of it so Python callers get a native-feeling async API - awaitable methods, async for over incoming messages, async with lifecycle, and exceptions for errors - while all behavior stays in the Rust core.

The generated low-level contract remains available at pamoja.raw.

Install

pip install pamoja-core

Build from source

python -m venv .venv
.venv/bin/pip install maturin pytest
.venv/bin/maturin develop
.venv/bin/python -m pytest

maturin develop compiles the Rust core into a native extension (pamoja._core) and installs the pamoja package into the active environment.

cargo run --bin stub_gen regenerates the committed type stub python/pamoja/_core.pyi. It is a generated artifact, drift-checked in CI so it can never fall behind the Rust source.

Usage

import asyncio
from pamoja import MqttClient

async def main():
    async with MqttClient(client_id="sensor-1", host="localhost", port=1883) as client:
        await client.subscribe("sensors/+/temperature")
        await client.publish("sensors/1/temperature", "21.5")
        async for message in client:
            print(message.topic, message.payload.decode())

asyncio.run(main())

Download files

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

Source Distribution

pamoja_core-0.1.8.tar.gz (27.1 kB view details)

Uploaded Source

Built Distributions

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

pamoja_core-0.1.8-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

pamoja_core-0.1.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

pamoja_core-0.1.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

pamoja_core-0.1.8-cp310-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

pamoja_core-0.1.8-cp310-abi3-macosx_10_12_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file pamoja_core-0.1.8.tar.gz.

File metadata

  • Download URL: pamoja_core-0.1.8.tar.gz
  • Upload date:
  • Size: 27.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for pamoja_core-0.1.8.tar.gz
Algorithm Hash digest
SHA256 ebae795fc5593c24fb2f282e6c2ef22b919ea400fbd7a1948c9b8c3963ce3b91
MD5 b9dc6895b0cd178bef6a19da51d2a991
BLAKE2b-256 1530386420f2059c6de324570e6cb0c88e121f4b233c85566dd9b5bdad541ed5

See more details on using hashes here.

File details

Details for the file pamoja_core-0.1.8-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pamoja_core-0.1.8-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 84634627b7c7f9be84a2ceee5e1ed9ab41641850a17d989d56d6a5ad7e518ede
MD5 add397fc307993abbc9a6d2d088233ad
BLAKE2b-256 df1f2621371c60e6576a74f45c1f342d6580732ae8ea3214011d2fe65fc3c378

See more details on using hashes here.

File details

Details for the file pamoja_core-0.1.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pamoja_core-0.1.8-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e15b634ae810c1e7def6e270e64e1a0d82e39249198a6b063dcdf7f09fc01001
MD5 abb2604f1d57ffded1857d2d80c2beef
BLAKE2b-256 9f5b2ae3dbcbc88074047cd5f7d0dcd8c16d2134496c2ed47769c0559720a9d0

See more details on using hashes here.

File details

Details for the file pamoja_core-0.1.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for pamoja_core-0.1.8-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 7fb535371855aa825497f7627e0c8df0d2b4325f7f37aff79d999271b58033c8
MD5 22035dc54a7536fb0c9ff6c670a8c233
BLAKE2b-256 371664a688a28b7ea0c435986b9dba862156a3f8d05730f418f783d0cb395c92

See more details on using hashes here.

File details

Details for the file pamoja_core-0.1.8-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pamoja_core-0.1.8-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f4b2aaf5b3aa448653fddd9fcd88059f756f709f1f772a55e57d3830212a44bb
MD5 e79169b3dd91af77d8e768adc3776eb9
BLAKE2b-256 f8c4d8722ec283d92dad86f00b2d3c799e10cfabf592e77d0c39e843f2ee3fd7

See more details on using hashes here.

File details

Details for the file pamoja_core-0.1.8-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pamoja_core-0.1.8-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fe24561e8c64f979d9590122c43654c47e8fec8e1e1e66e627f09286c1d51537
MD5 989f5fc7013fe6ed557de0748f540f87
BLAKE2b-256 8174813a38d000c74eaea7545c2f591fbff4ef3db8aad5d98f661d4672749c60

See more details on using hashes here.

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