Skip to main content

an opinionated Python framework for building IoT-to-MQTT bridge applications

Project description

cosalette

An opinionated Python framework for building IoT-to-MQTT bridge applications.

CI Docs PyPI License: MIT Python

Documentation · Quickstart · API Reference


What is cosalette?

cosalette lets you build IoT-to-MQTT bridge daemons in Python with minimal boilerplate. You define devices (telemetry pollers or command handlers), register hardware adapters, and the framework handles MQTT wiring, structured logging, health reporting, error publishing, and graceful lifecycle management.

Key Features

  • Declarative device registration@app.command(), @app.device(), and @app.telemetry() decorators (guide)
  • Hexagonal architecture — protocol-based ports with swappable adapters (concept)
  • Structured JSON logging — per-device context, configurable levels (concept)
  • Health & heartbeats — LWT crash detection, periodic JSON heartbeats, per-device availability (concept)
  • Structured error publishing — domain errors published to MQTT with type mapping (concept)
  • Pydantic settings — type-safe configuration from env vars and .env files (guide)
  • CLI for free--dry-run, --version, --log-level, --env-file via Typer (reference)
  • Test-friendlyMockMqttClient, FakeClock, pytest fixtures included (guide)

Quick Example

import cosalette

app = cosalette.App(name="weather2mqtt", version="0.1.0")

@app.telemetry("sensor", interval=5.0)
async def sensor() -> dict[str, object]:
    return {"temperature": 21.5, "humidity": 55.0}

if __name__ == "__main__":
    app.run()

See the full Quickstart for a complete walkthrough.

Installation

pip install cosalette

Or with uv:

uv add cosalette

Contributing

See CONTRIBUTING.md for development setup, commands, project structure, and code quality standards.

Documentation

Full documentation is published at ff-fab.github.io/cosalette.

Section What you'll find
Getting Started Installation, quickstart tutorial
Concepts Architecture, MQTT topics, lifecycle, hexagonal design
How-To Guides Step-by-step guides for each feature
Reference API docs, CLI options, payload schemas
ADRs Architecture Decision Records

License

MIT License. See LICENSE for details.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

cosalette-0.2.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl (575.3 kB view details)

Uploaded PyPymusllinux: musl 1.2+ x86-64

cosalette-0.2.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl (542.2 kB view details)

Uploaded PyPymusllinux: musl 1.2+ ARM64

cosalette-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl (573.7 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

cosalette-0.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl (539.8 kB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

cosalette-0.2.0-cp314-abi3-win_amd64.whl (224.7 kB view details)

Uploaded CPython 3.14+Windows x86-64

cosalette-0.2.0-cp314-abi3-musllinux_1_2_x86_64.whl (574.0 kB view details)

Uploaded CPython 3.14+musllinux: musl 1.2+ x86-64

cosalette-0.2.0-cp314-abi3-musllinux_1_2_aarch64.whl (540.4 kB view details)

Uploaded CPython 3.14+musllinux: musl 1.2+ ARM64

cosalette-0.2.0-cp314-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (372.7 kB view details)

Uploaded CPython 3.14+manylinux: glibc 2.17+ ARMv7l

cosalette-0.2.0-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (364.1 kB view details)

Uploaded CPython 3.14+manylinux: glibc 2.17+ ARM64

cosalette-0.2.0-cp314-abi3-macosx_11_0_arm64.whl (332.3 kB view details)

Uploaded CPython 3.14+macOS 11.0+ ARM64

cosalette-0.2.0-cp314-abi3-macosx_10_12_x86_64.whl (336.6 kB view details)

Uploaded CPython 3.14+macOS 10.12+ x86-64

cosalette-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (370.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

File details

Details for the file cosalette-0.2.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1b3931bf7645aa06e1c76d11653d44b9c82cccbbb6fb91353071e9dae05a27f7
MD5 cf80361b7139ffc384de21cc31833aad
BLAKE2b-256 294a0e021c9b214af7fd57911a87335a59e168b2dc0e279352a2066b0d6a7863

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-pp311-pypy311_pp73-musllinux_1_2_x86_64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 d1c59762e6f40fb495b7ae1561ccb139c613f6826e047228198eeb5d18d5d9f7
MD5 49cc14995a7ecf72a6b17503879b011b
BLAKE2b-256 2f0e996dc1ec605b4a34c836484552ca8b39c63e9f5a154e0fc2d5e7762f8f1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-pp311-pypy311_pp73-musllinux_1_2_aarch64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 21fc0b517f9e0662f61c5339aa031cd5fd9b5302089e40ee8d51a60382fa8df9
MD5 5133b16f587dcb76322f54def6e17fd1
BLAKE2b-256 ad4f87288e00cabeb64c890e146be1f6ec24ebccdda2a5b9edb8662ef2c3fc5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-cp314t-musllinux_1_2_x86_64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 fa07a6fefa925c66fd6390fe224cc733537406a23f153e471b1d213510545d96
MD5 820d46b6746163ad6bcad0ba27b08ff9
BLAKE2b-256 31187eafe3efa310aa3eec4ec94adeabd0ce98337bd26bc56b86043a1bdd11df

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-cp314t-musllinux_1_2_aarch64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-abi3-win_amd64.whl.

File metadata

  • Download URL: cosalette-0.2.0-cp314-abi3-win_amd64.whl
  • Upload date:
  • Size: 224.7 kB
  • Tags: CPython 3.14+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cosalette-0.2.0-cp314-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 661f407f2f12ce188fadad8d90e7eaf4a49922ae33fcbf3c1c95e72e194b392b
MD5 5a57efcb970a4627a4ba860a2b83b0c1
BLAKE2b-256 7eeed3770b33f0bb156f0fb0b1a3a91dee248fe3f4e78ece6eceee3cd6da910b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-abi3-win_amd64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp314-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e978a4b35ea049720e04dba175fd425f28ac503572845873dc349547b45664cf
MD5 fa51f46543454aaf16fff0bfb5ee8f81
BLAKE2b-256 85f801ba6df0a024158bcf4e1a0d18a562e09e66ecb844e7fa4edf95da6d59f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-abi3-musllinux_1_2_x86_64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp314-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 04d8a7d24b961111f9c0804ef287022fd82a56ba3f964a828bf0f2e04d0f1df4
MD5 352e9ab76bb557895dc1ef0a2b291a56
BLAKE2b-256 c562a9333c1404560f78578ace3caf8e83dfc825a72b4ebca6c3cb15423368b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-abi3-musllinux_1_2_aarch64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp314-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 b17a5de3d0fbe916544a6116c98005f2cce06768ac803f366eb351a0fec3d4de
MD5 85e0d31a460a0f3f2c44c8cc97bbb34a
BLAKE2b-256 9ba7b0852e9df28385a95f9d28d2ba66b0cea0f1637056487e405adc5e46ff06

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 64277fdbda037605cf68b9f21730a95fb5f85324e244ce2e7eec42f2508fee1d
MD5 b1d7998c7b503637e737d35a0d38563f
BLAKE2b-256 9a114fe6028133402c276fa831839349837f267ca214dc44c38a97a729894f36

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp314-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f76fc2d467d38616cda38464ead0ec49d6ca3a9c11e6e67ff1ddb870681a9e2
MD5 605165ada7eb7756a944ca6ebbe02eb9
BLAKE2b-256 839c7c0567dc7b6f0df3125df8db0693078cae664fa604309667a40fdeb2e564

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-abi3-macosx_11_0_arm64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp314-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp314-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 887db810ac2f569297dbe7f89188a0e23d2bad7f6cc6d866cf147d38453ad22f
MD5 c9bfd073c959b758f1b0e7455970f9e6
BLAKE2b-256 88f5b1528165c262d64421aef18bb39829805b36e268f8fad7f381d65b66d152

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp314-abi3-macosx_10_12_x86_64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cosalette-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cosalette-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 60b81d3db382068dc01834f8ffdd05b6208cef02bdbfc52a695d1b90181dcccb
MD5 71a8dec6f836755ef42c2a056fb483d4
BLAKE2b-256 138bc33f62d20b26a4365e6ffd349184ae2e4127e55ceaaa9f9df2c3e5b07c2b

See more details on using hashes here.

Provenance

The following attestation bundles were made for cosalette-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-please.yml on ff-fab/cosalette

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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