-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example on usage via async #185
Comments
Is there something specific that you would want shown in said example? |
No not really just a |
For now i have a working solution with pure |
I would like to see an example which used a async/await instead of callbacks. Simple examples would be:
|
This would be sweet! |
I have a Question Related to the Topic. Is it even possible to use Asyncio with Mqtt without using a seperate Event Loop? Because aws is using its own asnyc |
I am on a small team making use of this project and we are experiencing difficulties incorporating this into an app that leverages python's official asyncio solution as well. Documentation on how to cleanly use this package alongside asyncio would be very beneficial. |
I am in the same boat as @golkedj above. Can we use the same event loop the rest of the application uses? |
Any intention on releasing such an example? |
This is not something that we are going to add a sample for in the near future, so I will be closing this feature request for now. Right now it is not possible to use async/await with this sdk because of how it was designed. It would require changes to the bindings to allow it to work. Sorry if you where waiting for a sample for this, I just want to be transparent that this is not something we are working on adding |
|
I have figured out a way to use it in an asynchronous context I THINK, I linked a file in one of my repositories that contains an asynchronous AWSIoTClient import asyncio class AWSIoTClient:
Plain Functions for Easy Usage_client_instance = None async def start(): async def stop(): async def publish(topic, payload, source=None): async def subscribe(topic, callback=None): |
Platform/OS/Device
What are you running the sdk on? linux, python >= 3.7
Describe the question
There are for v1 and v2 no examples on how to use it with async/ await
The text was updated successfully, but these errors were encountered: