INNER CODE UNIT · Python

MQTTConfig

sabuhish/fastapi-mqtt · fastapi_mqtt/config.py:8

class MQTTConfig(BaseModel):
    """
    MQTTConfig is main the configuration to be passed client object.

    host: To connect MQTT broker, defaults to localhost
    port: To connect MQTT broker, defaults to 1883

    ssl: an SSL/TLS transport is created (by default a plain TCP transport is created)
        In case of an ssl.SSLContext object, context is used to create the transport.
        Alternately passing bool value, will set  a default context,
        which is calls ssl.create_default_context().

    keepalive: Maximum period in seconds between communications with the broker.
        This controls the rate at which the client will send ping messages.
        Defaults to 60 seconds.

    username: username for authentication, defaults to None
    password: password for authentication, defaults to None

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…