types-paho-mqtt
Typing stubs for paho-mqtt
What it is and what it does
This package provides PEP 561 type stubs for the paho-mqtt MQTT client library, version 1.6.*. Type stubs are metadata files that tell static type checkers like mypy and pyright what types to expect from paho-mqtt's functions and classes, enabling type-safe code development without requiring the library itself to include annotations.
The stubs are maintained in the Python typeshed repository and tested against multiple type checkers. If you are using paho-mqtt 1.6.x and want static type checking support, install this package alongside paho-mqtt. Note that paho-mqtt 2.0.0 and later versions include their own type annotations, making this stub package unnecessary for newer releases.
Use it for:
- Enable mypy or pyright to type-check code that imports and uses paho-mqtt 1.6.x.
- Catch type errors in MQTT client setup and message handling before runtime.
- Provide IDE autocomplete and type hints for paho-mqtt APIs in editors like PyCharm.
- Maintain type safety in projects locked to paho-mqtt 1.6.* for compatibility reasons.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for paho-mqtt 1.6.* to enable static type checking with mypy, pyright, pytype, and other tools.
Yes, if you use paho-mqtt 1.6.* and want static type checking. Install friction is negligible, maintenance is active, and the Apache-2.0 license poses no restrictions. Do not install if you are already on paho-mqtt 2.0.0 or later, as those versions include built-in type annotations.
Install
types-paho-mqtt on PyPI
pip
pip install types-paho-mqttuv
uv add types-paho-mqttpoetry
poetry add types-paho-mqttInstalling types-paho-mqtt
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained via typeshed with recent updates.
License in practice
Apache-2.0 permissive license allows use in most projects with minimal restrictions.
Quickstart
pip install types-paho-mqtt
# In your code using paho-mqtt, type checkers will now understand the types
import paho.mqtt.client as mqtt
client: mqtt.Client = mqtt.Client()
Requires paho-mqtt 1.6.* to be installed separately; paho-mqtt 2.0.0+ includes its own type stubs and makes this package redundant.
Verify before relying
- Whether type coverage is complete for all paho-mqtt 1.6.* APIs and edge cases.
- Compatibility with paho-mqtt 1.6.x patch versions beyond the latest tested release.
Package facts
| License | Apache-2.0 license (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 876 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 135,318/month — #11,441 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_paho_mqtt-1.6.0.20240321-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-botoProvides type stubs for the boto AWS SDK,…
permissive · top 15,000 on PyPI
types-redisProvides type stubs for the redis package,…
permissive · top 1,000 on PyPI
types-PillowProvides type stubs for Pillow, enabling static…
permissive · top 5,000 on PyPI
paho-mqttProvides an MQTT client library for connecting…
copyleft · top 5,000 on PyPI
tb-paho-mqtt-clientProvides an MQTT client library implementing…
copyleft · top 15,000 on PyPI
types-urllib3Provides type stubs for urllib3 to enable…
permissive · top 1,000 on PyPI
types-typed-astProvides type stubs for the typed-ast package,…
permissive · top 15,000 on PyPI
types-stripeProvides type stubs for the stripe package,…
permissive · top 5,000 on PyPI
asyncio-mqttProvides an async/await interface to MQTT…
permissive · top 15,000 on PyPI
aiomqttAn asyncio-native MQTT client that wraps…
permissive · top 5,000 on PyPI