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.12.tar.gz (28.3 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.12-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

pamoja_core-0.1.12-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.12-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.12-cp310-abi3-macosx_11_0_arm64.whl (1.3 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

pamoja_core-0.1.12-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.12.tar.gz.

File metadata

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

File hashes

Hashes for pamoja_core-0.1.12.tar.gz
Algorithm Hash digest
SHA256 3f31517bae0383b1afe94d9ad1ec0357bb68abf1a2caa5ba609b9e7f786a9d9c
MD5 074d89f3ee8f3c77db6dcfbe27a7ea67
BLAKE2b-256 b7968ae9e314eab4ae02898b37b911c97ed083373f33a2212e9eb10333672627

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.12-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 49c37b79097dc27284ebf07d5ccbf3e74f7a2dad9857d10840e86f1afa65e563
MD5 b991c9461373086b1f621706b78721af
BLAKE2b-256 60bc656400f2f029a235ad8d00a2b590a6e32d4732aa406afe4ea4e0c5a72395

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.12-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 18b6c6442320a7ef4b505af30ebf5757e271d0d864cba4dafe6ddcb7c6b15dfd
MD5 286aab1b055e6402c38aae7aec62ff41
BLAKE2b-256 388844906c4d9fe63cdfe49223326f90b4c55857db231576d3ee5cf94c769105

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.12-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 72ab5b96cc795e4101b84cb1d80ab9e538a8dd09e6439b6aa230cdd3c98a8162
MD5 ccbada4990583dec805f78879c2e79d6
BLAKE2b-256 10d57e9b418df9a21a3863c54a864a5894f1c73523348dcf8d220a0a59ab22a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.12-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5ace51d69c01f65ab3b62e9e4fb01ac10e8c0af0c988cde24ebff2a001c10fbc
MD5 7287ab997cf96506c65ade8684c6e7a4
BLAKE2b-256 059ea49af0017d2a98ae2f0b6339092c6bcd584d71cc5049cdf1cd973431ba81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.12-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a05c5bfa3d2cbab46d1f86560dd476c1e9a892edaa3ef3bcf55c011aa27c9014
MD5 4b7fd2aa13adfbebe436b02588538b05
BLAKE2b-256 a346f591908c7dc6b7f2c0f971adf04a842b6d74a8dc257c5770855ba16bab48

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