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.13.tar.gz (27.0 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.13-cp310-abi3-win_amd64.whl (518.8 kB view details)

Uploaded CPython 3.10+Windows x86-64

pamoja_core-0.1.13-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (741.7 kB view details)

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

pamoja_core-0.1.13-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (725.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

pamoja_core-0.1.13-cp310-abi3-macosx_11_0_arm64.whl (643.6 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

pamoja_core-0.1.13-cp310-abi3-macosx_10_12_x86_64.whl (647.0 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for pamoja_core-0.1.13.tar.gz
Algorithm Hash digest
SHA256 790dbbc21ee13837d4ea2257319366d16ef8851028c990873294fe933e452cf1
MD5 c0ee7e6839a0e0b4ec5b3d1232db1595
BLAKE2b-256 c7e5825d64fd6faf178afa9a968037a9bfa93d564285d1d97838e2fbe4f5af6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.13-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3eff929f4aff406f400a05f1e05767a6d30081b124e3cab5817b0cafe6f2558d
MD5 b2587cf5dad2b2f52b8caf2d2a12bf05
BLAKE2b-256 ca0b27ef2c012df1fae79fb16fc6e238c98e79ba90eaf4a1d98e324b8c9c7027

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.13-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a47789c1dd649d1ee03df2272bf8af2201c7aa0a22404d348dbe232f9725c575
MD5 7036be46cebfe3dfa6fb328af9c7063f
BLAKE2b-256 05760921377e277b86c1a608717e5b92014da88664a5d2188d9a1ec9dc8bdca1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.13-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ba325a7af8fafd89042927943687e2a32d5ca9316cf790a2719dfc630626a7fc
MD5 b60877a6c98cf35abb0b67ca7a41337a
BLAKE2b-256 579add301ef6c54ab4778aefd3f3c845b186bd3a9e9738b03c9415df730202ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.13-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4ddd978d3db95ba9af48a49d1daea2c84d05974c8b602685543d219ebaff068e
MD5 91358b621d5e2f1dd59b56e9174b40b0
BLAKE2b-256 14f8b77ef003e80b4be97397e334a67bd84fc072856df9f18996be6a53a6fd25

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.13-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6366a61dd35c4b8e043a708b1065ceaf735da81e6379f3ed21870cd22aed8bbe
MD5 d378faa3adf07c17f2498d98f5184fa2
BLAKE2b-256 9b34778998b7b946e698bb6646f86e4e10ac788fa3f44ecccaf062676441f80b

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