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.9.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.9-cp310-abi3-win_amd64.whl (1.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

pamoja_core-0.1.9-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.9-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.9-cp310-abi3-macosx_11_0_arm64.whl (1.2 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

pamoja_core-0.1.9-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.9.tar.gz.

File metadata

  • Download URL: pamoja_core-0.1.9.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.9.tar.gz
Algorithm Hash digest
SHA256 ab43ac43c995f033af38d6d9d8b2b012295ab948911ddaef9d25171cd47f289a
MD5 0f6e36626143ff8435dc96244b4180fa
BLAKE2b-256 56500500b92eec2cf80fa88cb7521ce3f8beb7467f5f873034f54d52f761128e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.9-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 479daa7dc5bbebfcecf61c523587649349fd99573ab46c1cb129a583fbb82448
MD5 39385377cc2da8c736129ec0a0f9b5c6
BLAKE2b-256 84aa0baf4adc0c79818b5958041149ad63d989a3bc2ae7c1e87605ef2b3be36a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d16693fdaaf5a6398057ca0b800c9e6549b05402f00cf4b7983e94a69b081a2d
MD5 e550465f9f434a5331821fd5d79d3046
BLAKE2b-256 35d19bc831e17e98b2860e871cfe72c8cd76b1219e9036875f30c405b9168e19

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.9-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 a3e06eaf3b14a70cfd1bd8e6f4b5918c9d974380df169b23283c22b63c28839e
MD5 d7c864e8ba3e45fcc69487b44e9cd5f1
BLAKE2b-256 1c05ae79c95087dae4ec560aa19f44b8978c9d62d9b87a33d5e2d0c2a4f03de0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.9-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 75b67b6780fd0604dc9909a2ef3f2f5c4b0e38d27d170f5f7d143ace6347abb3
MD5 2f323fd71ca4bf4a600d5ede874e103a
BLAKE2b-256 c9df2ea8e44ae025edced8b46e2abfd03fb4d8ce836ba6839378917bb3bf1376

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.9-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b3686cfbc6b301e204e4cb780b815ea726c4d6a4bd11d1b83c1a6a1184e50528
MD5 344c8966ada71af347d58faaa1094882
BLAKE2b-256 20f62c48a733f49f972f44042a5dd55e600ad165a725d685dc9081c28466b601

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