Skip to main content

A Paho MQTT client supporting asyncio loop without additional setup.

Project description

Asynchronous I/O (asyncio) Paho MQTT client

A Paho MQTT client supporting asyncio loop without additional setup. Forget about configuring the Paha network-loop. The client can almost be used as a drop-in replacement for Paho Client. The asyncio loop is automatically configured when you connect. You should use connect_async to connect to avoid blocking.

client = AsyncioPahoClient()
client.connect_async("mqtt.eclipseprojects.io")

# do mqtt stuff

client.Disconnect()

Asynchronous Context Manager

The client is an Asynchronous Context Manager and can be used with the Python with statement to atomatically disconnect and clean up.

async with AsyncioPahoClient() as client:
    client.connect_async("mqtt.eclipseprojects.io")
    
    # do mqtt stuff - client.Disconnect() is called when exiting context.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

asyncio_paho-0.1.0.tar.gz (5.0 kB view hashes)

Uploaded Source

Built Distribution

asyncio_paho-0.1.0-py3-none-any.whl (5.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page