Skip to content

A Litestar package for the MQTT protocol, ported from fastapi-mqtt

License

Notifications You must be signed in to change notification settings

Alurith/litestar-mqtt

Repository files navigation

litestar-mqtt

Litestar-mqtt is porting of Fastapi-mqtt for the Litestar framework.

For more information about MQTT, please refer to the Fastapi-mqtt MQTT documentation.

As Fastapi-mqtt, Litestar-mqtt wraps around gmqtt module.


Features:

Litestar-mqtt implements the same feature of Fastapi-mqtt and also:

  • Load configurations via .env file
 MQTT_HOST="mqtt-dashboard.com"

Installation:

 $ pip install litestar-mqtt

or

 $ poetry add litestar-mqtt

Differences:

Litestar-mqtt must be hooked to the on_startup and on_shutdown handlers.

 app = Litestar(
    route_handlers=[test_func],
    on_startup=[lite_mqtt.startup],
    on_shutdown=[lite_mqtt.shutdown],
)

About

A Litestar package for the MQTT protocol, ported from fastapi-mqtt

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published