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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

pamoja_core-0.1.11-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.11.tar.gz.

File metadata

  • Download URL: pamoja_core-0.1.11.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.11.tar.gz
Algorithm Hash digest
SHA256 91813796d7a15c6cf83dbed2cb7c70c47038ffa4ab76b9b13c0a145f3b0ed53b
MD5 a52ed19ef050d518ee38078116a920b3
BLAKE2b-256 1886bc9abd0c14c23bdbcf8a3623c63ad11d381395f5c9803279e6aabe2dbbd6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.11-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 bdcaf247cbe8b17893b1ad49de57bb58da50ca62525e765e49f13cd7bc7824e8
MD5 75548fd429c7b8d4138b641489ef29ae
BLAKE2b-256 261948a76d331bf1db8b480dd6e98e2494029ec1e11d8e5bb9fb61f79f90ed22

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.11-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 cd303a7002dfc1d38ec9e2a39a7c1fdd851d063000836a748ae53fa346bed191
MD5 306a966f95409c4eb2c15728754c9f2e
BLAKE2b-256 6b5b1dda18d65730f8144da842f110444795483c8149638946577b3d57e9b952

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.11-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 0247aa7a5a13d1d7f37c72aef862a0a2bbb7a126b3a306b89906622a160e4741
MD5 331b8e38f689a48a6747c85c22774664
BLAKE2b-256 0061225f283e269db345a242ea4d9f0f97529fda70e097028080f59bd2ce6053

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.11-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3d5ca9832691be4da6c0150437dfec593ff78aeeaf2cbcda2e51b5a94bd8f264
MD5 26b1689edfff495468ef39b3a23f5708
BLAKE2b-256 8c7a6e16524ef805bd65abd9144e3a2a8649f035f32a37dd47d4a9eb2f8ce9b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pamoja_core-0.1.11-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9f3dcc7f19144b2d9be254b73a5a0fb270cdfae23f57cc9ae4fa0f75d31a1923
MD5 a4424f2285711b1167eb454293fa62d4
BLAKE2b-256 29e0f8daf79708aac102473ba3c9dad3bb4a560523bf221c29668fd91525b8d0

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