Skip to content

FastApi-MQTT

Extension

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 MQTT, please refer to here: MQTT

Fastapi-mqtt wraps around the gmqtt module, a Python async MQTT client. The module supports the MQTT version 5.0 protocol.

Badges

MIT licensed GitHub stars GitHub forks GitHub issues

Available Features

  • Subscribe to topics with decorated handlers, publish to topics
  • Pydantic models for message payloads, to receive and publish typed messages
  • MQTT 5.0, with callbacks for connection events
  • MQTT settings with a pydantic class, authentication to the broker with credentials