Registry / http-networking / tb-paho-mqtt-client

tb-paho-mqtt-client

JSON →
library2.1.2pypypi✓ verified 80d ago

A MQTT version 5.0/3.1.1 client class built on top of paho-mqtt. Version 2.1.2 (Python >=3.7). Active development.

pip install tb-paho-mqtt-client
INSTALL
IMPORT
SIG · TB-PAHO-MQTT-CLIEN
T
tb-paho-mqtt-client
http-networkingpythonv2.1.2
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.3MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from paho.mqtt.client import Client
from tb_paho_mqtt_client import Client

Minimal client connecting, publishing, and disconnecting.

import os from tb_paho_mqtt_client import Client client = Client(client_id='test-client', protocol=3) client.username_pw_set( os.environ.get('MQTT_USER', ''), os.environ.get('MQTT_PASS', '') ) client.connect( os.environ.get('MQTT_HOST', 'localhost'), int(os.environ.get('MQTT_PORT', 1883)) ) client.loop_start() client.publish('test/topic', 'Hello from tb-paho-mqtt-client') client.loop_stop() client.disconnect()
Debug
Known issues
gotchaPython package name differs from import name. The package is `tb-paho-mqtt-client` but import uses `tb_paho_mqtt_client` (underscores).
fix
Use `from tb_paho_mqtt_client import Client`.
affects: all
breakingVersion 2.x changed the public API significantly. Old code using version 1.x direct paho-mqtt wrappers may not work.
fix
Migrate to new Client class; see v2 migration guide.
affects: >=2.0.0
deprecatedMQTT v3.1 (protocol=2) is unsupported. Use MQTT v3.1.1 (protocol=3) or v5.0 (protocol=5).
fix
Set protocol=3 or 5 when creating Client.
affects: >=2.0.0
Upgrade
Version history
2.1.2latest on PyPI · released Apr 7, 2025
Audit
Dependencies
paho-mqttrequiredunderlying MQTT library
Agent activity
20 hits · last 30 days
node
14
Bingbot
1
OpenAI (training)
1
Resources
tb-paho-mqtt-client — pip install tb-paho-mqtt-client · libregistry