Skip to main content

The MQTTv5 protocol for Python written in Rust

Project description

mqtt5

PyPI downloads PyPI version Supported Python versions

A sans-I/O implementation of the MQTTv5 protocol for Python written in Rust. Serialization is ~5x faster and deserialization ~20x faster than comparable Python code (benchmarked against mqttproto).

Reading/Writing a QoS=1 Publish packet with a 256 bytes payload.

Write a packet

import mqtt5

buffer = bytearray(1024)
n = mqtt5.ConnectPacket(client_id="Bulbasaur").write(buffer)

Read a packet

import mqtt5

buffer = bytearray(b"\x20\x03\x00\x00\x00")
packet, n = mqtt5.read(buffer)

Installation

pip install mqtt5

Documentation

See the stub file for an API reference and the MQTTv5 specification for details about the de/serialization.

mqtt5 enforces the specification. Invalid packets raise exceptions rather than being silently ignored or partially parsed.

Versioning

This project adheres to Semantic Versioning.

Changelog

See CHANGELOG.md, which follows the principles of Keep a Changelog.

Acknowledgments

mqtt5 was inspired by Brett Cannon's sans-I/O documentation. I've also learned a lot from Alex Grönholm's mqttproto, which is an excellent pure-Python MQTTv5 protocol implementation.

Project details


Download files

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

Source Distribution

mqtt5-0.2.0.tar.gz (37.2 kB view details)

Uploaded Source

Built Distributions

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

mqtt5-0.2.0-cp310-abi3-win_amd64.whl (225.3 kB view details)

Uploaded CPython 3.10+Windows x86-64

mqtt5-0.2.0-cp310-abi3-win32.whl (217.2 kB view details)

Uploaded CPython 3.10+Windows x86

mqtt5-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl (483.6 kB view details)

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

mqtt5-0.2.0-cp310-abi3-musllinux_1_2_i686.whl (508.4 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

mqtt5-0.2.0-cp310-abi3-musllinux_1_2_armv7l.whl (572.7 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

mqtt5-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl (471.7 kB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

mqtt5-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (312.1 kB view details)

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

mqtt5-0.2.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (341.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390x

mqtt5-0.2.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (336.8 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

mqtt5-0.2.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (309.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

mqtt5-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (291.4 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

mqtt5-0.2.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl (330.0 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.5+ i686

mqtt5-0.2.0-cp310-abi3-macosx_11_0_arm64.whl (278.6 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

mqtt5-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl (303.1 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file mqtt5-0.2.0.tar.gz.

File metadata

  • Download URL: mqtt5-0.2.0.tar.gz
  • Upload date:
  • Size: 37.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.3

File hashes

Hashes for mqtt5-0.2.0.tar.gz
Algorithm Hash digest
SHA256 62b23d96da49f1eab95ff6e7bc97833d6cacc3b3e0f1301580216772aa821fc6
MD5 7a005265573939991f8e547475c24f65
BLAKE2b-256 6d46e290effbc0ce03456c11be95388689e921d91f6ca9ce77cccabc7b856f06

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: mqtt5-0.2.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 225.3 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.3

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9019b60fc01c9a91e68a2d8b5cd2cee962c78e6ff61a7d17a4d4146e683172e7
MD5 58036a6d138e6811b14db3f993586dc9
BLAKE2b-256 bc6dc4728438463f286ff053a7337122f5fb0517c3993419247faf4501d5cf22

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-win32.whl.

File metadata

  • Download URL: mqtt5-0.2.0-cp310-abi3-win32.whl
  • Upload date:
  • Size: 217.2 kB
  • Tags: CPython 3.10+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.9.3

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 045c46cf4cb8aaae7c9bb3ea4da89ccda4e5f7d1af0d99f6316750836511a059
MD5 e8c238561264ff549f610fbe1a899ea4
BLAKE2b-256 cc8c6c1e8932a58bd73a1755d560723131113a63e36c8c837ee6040bc79a031d

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 2fe11d5a1da1fcfde733f3058a42439c0a129c8559fa186bf7b7f11e83dc3756
MD5 8037c8ebdadd3a0ee01d3362fc3d0fd6
BLAKE2b-256 6d54bab249bd35aa5fbdda9c4500bd2d824750fb626d1281689292616930cb2f

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 0ca54347202081c52573467a108cfe68070498a2cdd22397096fc4606a22698b
MD5 c75f0c005faf7ff4fd81d2bda360ea7c
BLAKE2b-256 fc3b1ff76a2114e94323c95d5846ef3267adc495aa3a5f46a672636c67d87533

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 240aec0e934fd42f1fc0e69c511d0e9010ba2c849e9e91d6bdc1af48b930dfdc
MD5 8b534b308b5a2a47e4b8dea5985f5fee
BLAKE2b-256 59f12388d3dc783496e93b6fb1b5631e1274169b85b4985136a66f1de1d4d206

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 bc1c9f0b37ee1ba46f012ff3808f97f5785103125d0df898115e4de643fd7489
MD5 afe537700eb9964d363ace87b5918c3b
BLAKE2b-256 8dcce78fd76499dea63b2805fd12f7f0da2a92127d4c2fb5e9651c523eb10f3b

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6bccc3e742da6a884a7f202087c86e881beee52706c37c428afd1b285f5a0b8
MD5 4db75eb5f2c9db15d4131ffb99ee6b35
BLAKE2b-256 407bb22f5611464f657cbbd027e23afa9ed8b555b1494ee96c8cde264a84b0b4

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 b2527bd9649468d8f3579eb3d3add4752128e24bc1dacfbfed45fd7d98b6b7f6
MD5 df534c7bf3fd34796f8ff7dc11e5ce03
BLAKE2b-256 28874aa7f4139f5257166ddaaa1b1d76ec65d1ddd7254af8d93cb2d8dc25f987

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 a8000f9e67350d32f98041b565c28b62b71b37927b5328181b96fb28f5b4c0d4
MD5 5a48c2541e6380c724eb86df8be1776c
BLAKE2b-256 0677a3a734be4f3c7f2a378500182dab17b0d189de590d5b464fdc65937f704f

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 a2771721da6ec53c6314819bfc626ee27b88ecfa51a6672fb1074fb5463204fc
MD5 b6171b26287546fa2d9eb4037d325cc7
BLAKE2b-256 8402967e83e97886f76e0612510c4985e14388131314ff91d2bd819720bb0281

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ce65c67b14e6762f8f89dfc185dfcd12165bb0241134cc28048e8b83c50a3d9f
MD5 7cb2552d601701aa870b84a79d3e6f09
BLAKE2b-256 c582596734bd567548d782c7d823972a7cd84c70f152ec6c911dec593b48e412

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 65e2d7ca5fd1188942e80120fca08d4f827cd480b46ee84653389c65bc764db1
MD5 3c86a50efa0e6bf5892561812401127e
BLAKE2b-256 3a5e0324b7311470d38bbcef705c802f1da3e2a291dfda6d36ad67b1e9835cbc

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 60886ba29cc6f1a0a0429d0dccdf13bafdd6f907c19ff4135407ada82a3b2c9c
MD5 8e74cd6ca80ff6c5c10924a3056e37ff
BLAKE2b-256 9290207a0570b379df74cb9868a6861b70b85a165227f7ab1aeea8980c79d10d

See more details on using hashes here.

File details

Details for the file mqtt5-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for mqtt5-0.2.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0ce62f2f8e18522dab466af3f4c829af6d20b3561aaa05f275a46b3f761e523f
MD5 162ddfdbb27b899daad37d582e96ce81
BLAKE2b-256 69abafbdac991036ab438c860d2b7b618e436558660d5575e695c5f0a445575e

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