--- id: tb-mqtt-client version: "1.13.13" license: Apache Software License (Apache Software License 2.0) license_treatment: permissive maintenance: active --- # tb-mqtt-client — ThingsBoard python client SDK License: permissive · Maintenance: active · Downloads: 109.8K/mo ## What it is and what it does This package provides a Python client library for interacting with ThingsBoard, an open-source IoT platform. It abstracts the complexity of MQTT and HTTP communication, allowing developers to send device telemetry, manage attributes, subscribe to server updates, and handle remote procedure calls without building protocol handlers from scratch. The SDK supports both device and gateway modes, with MQTT offering QoS 0 and 1 delivery guarantees and automatic reconnection, while HTTP provides a simpler alternative for basic operations. It includes built-in support for TLS encryption, firmware updates, and device claiming. The library wraps tb-paho-mqtt-client for MQTT operations and requests for HTTP, simplifying integration into Python applications that need to communicate with ThingsBoard. Use it for: - Send sensor readings and device metrics to ThingsBoard for real-time monitoring and visualization - Subscribe to attribute changes from the server to dynamically update device configuration - Implement gateway functionality to relay telemetry from constrained devices through a single connection - Handle remote procedure calls from ThingsBoard to trigger device actions or retrieve system information - Manage secure MQTT connections with TLS certificates for production IoT deployments ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python client SDK for ThingsBoard IoT platform, supporting MQTT and HTTP protocols for sending telemetry, managing attributes, handling RPC commands, and device/gateway operations. Yes. The package is actively maintained, has no known vulnerabilities, requires only three lightweight dependencies, and provides a straightforward abstraction over MQTT and HTTP protocols for ThingsBoard integration. It is well-suited for any Python IoT application targeting the ThingsBoard platform. Install if you are building a device or gateway client for ThingsBoard. ## Install pip install tb-mqtt-client uv add tb-mqtt-client poetry add tb-mqtt-client ## Installing tb-mqtt-client Before you install: Low install friction with a pure-wheel distribution. Actively maintained with recent commits and steady releases since 2019. Requires Python 3.9 or later. License in practice: Licensed under Apache Software License 2.0 (permissive), allowing commercial and private use with minimal restrictions. Quickstart: pip install tb-mqtt-client from tb_mqtt_client import TBDeviceMqttClient client = TBDeviceMqttClient("127.0.0.1", username="A1_TEST_TOKEN") client.connect() client.send_telemetry({"temperature": 41.9}) client.disconnect() Requires Python 3.9 or later; ThingsBoard server must be accessible at the specified host and port. Verify before relying: - Whether TLS v1.2 is the only supported TLS version or if newer versions are also supported - Performance characteristics when handling high-frequency telemetry or large device counts - Specific version constraints or compatibility notes for tb-paho-mqtt-client, requests, and orjson ## Package facts - License: Apache Software License (Apache Software License 2.0) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 109.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags thingsboard mqtt client, iot device telemetry python, mqtt http iot sdk, thingsboard python sdk, device gateway mqtt client, iot platform integration, mqtt telemetry attributes, iot-platform, mqtt-client, device-management [View on SkillFed](https://skillfed.io/packages/tb-mqtt-client) · [View on PyPI](https://pypi.org/project/tb-mqtt-client/)