Skip to content
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: Add zeromq example #2941

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Conversation

keenanjohnson
Copy link
Contributor

This change adds a basic zeromq implementation with nicegui.

In order to do this, the zmq python library is used to create a publisher and a subscriber. The main interesting aspect is that the zmq.async library is used to create a subscriber that can be used in an asyncio loop, which is necessary to run the NiceGUI server.

I hope this will be useful to the community as it took me a bit of time to figure out. Let me know what you think.

This change adds a basic zeromq implementation with nicegui.

In order to do this, the zmq python library is used to create a publisher and a subscriber. The main interesting aspect is that the zmq.async library is used to create a subscriber that can be used in an asyncio loop, which is necessary to run the NiceGUI server.
Copy link
Member

@rodja rodja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks cool! Thanks for the contribution @keenanjohnson!

@falkoschindler falkoschindler self-requested a review April 24, 2024 05:33
@falkoschindler falkoschindler added the enhancement New feature or request label Apr 24, 2024
@falkoschindler falkoschindler added this to the 1.4.23 milestone Apr 24, 2024
Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the pull request, @keenanjohnson!
I just simplified the code a bit here and there. Let's merge. 🙂

@falkoschindler falkoschindler merged commit 64b9f40 into zauberzeug:main Apr 25, 2024
1 check passed
@keenanjohnson
Copy link
Contributor Author

Excellent and thanks for the review! Glad I could contribute back a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants