parley-mqtt
Request/response RPC over MQTT — the Python (asyncio) reference implementation of the Parley v1 protocol.
Install
parley-mqtt; importparley. (The bareparleydistribution name on PyPI is an unrelated project; the module name is unchanged.)
Parley turns the MQTT broker you already share into something you can make requests over: call a command on another device, stream progress while it runs, cancel it, and receive one typed result — success or a clear error. It is a small library, not a server: it rides your existing MQTT connection and never holds your broker credentials or TLS material.
One wire protocol, four parallel reference libraries — C#, TypeScript/JS, Python, and
C++ (ESP32/Arduino) — so a .NET service, an edge script, a Python service, and firmware can all
call each other. parley-mqtt is the Python one.
- Pure
asyncio; fully type-hinted (py.typed); CPython 3.10+. - Zero required runtime dependencies — you supply a live MQTT connection through a tiny adapter you write.
- At-most-once execution correct even at QoS 0; retries, dedup, heartbeats, progress, real cancellation, and six built-in error codes.
pip install parley-mqtt
from parley import ParleyCommander, ParleyTopics
topics = ParleyTopics("home/backup/req", "home/backup/hb", "home/backup/prg", "home/backup/res")
commander: ParleyCommander[Req, Prog, Res, Err] = ParleyCommander(adapter, topics)
result = await commander.execute({"target": "photos"}, on_progress=lambda p: print(p["percent"]))
if result.is_success:
assert result.value is not None
print(result.value["bytesWritten"])
else:
assert result.error is not None
print(result.error.code)
Documentation
- Repository: https://github.com/serionist/parley-mqtt
- The wire protocol (normative): https://github.com/serionist/parley-mqtt/blob/main/docs/protocol.md
- Worked Python example: https://github.com/serionist/parley-mqtt/tree/main/examples/python
- Design notes: https://github.com/serionist/parley-mqtt/blob/main/docs/design.md
License
MIT © The Parley Authors.
Metadata
Release files for parley-mqtt 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parley_mqtt-1.0.0.tar.gz | 45.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parley_mqtt-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 74.8 kB
Release files / parley_mqtt-1.0.0.tar.gz
| Download URL | parley_mqtt-1.0.0.tar.gz |
|---|---|
| Size | 45.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a3415339555771ca425cf974316752a66731abfb7c334c4eb1f0e6c2055e3dd
|
|
BLAKE2b-256 checksum How to use checksums |
3e9c696f1e2c1700c6e6b20214ec1b886bf8f2c1e05d22c8f55ee38e515fd8d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / parley_mqtt-1.0.0-py3-none-any.whl
| Download URL | parley_mqtt-1.0.0-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
921f5529f5c1272b6100b72d2d730fa675cb0875d225edc58fa43ef324ba6254
|
|
BLAKE2b-256 checksum How to use checksums |
036adae46b19061db9c789da88ab174ed636dca1a6a0dd9134316a0758c3390e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency log