Skip to content



MQTT is a lightweight publish/subscribe messaging protocol designed for M2M (machine to machine) telemetry in low bandwidth environments. Fastapi-mqtt is the client for working with MQTT.

For more information about MQQT, please refer to here: MQTT

Fatapi-mqtt wraps around gmqtt module. Gmqtt Python async client for MQTT client implementation. The module has the support of MQTT version 5.0 protocol


MIT licensed GitHub stars GitHub forks GitHub issues Downloads

Available Features

MQTT specification avaliable with help decarator methods using callbacks:

  • on_connect()
  • on_disconnect()
  • on_subscribe()
  • on_message()

Base Settings available with pydantic class:

  • Authetication to broker with credentials
  • unsubscribe certain topics and publish to certain topics