Repository navigation
Websockets & Event hub - #366
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Token change ('set_token', 'reset_token', 'login', 'logout')
re-authenticates the websocket and wakes the hub from auth failure
backoff.
- 'ServerAPI' creates its hub on demand.
- 'EventHub' requires connection.
- One 'atexit' callback stops all hubs, hubs are stored weakly so stopped
hubs and their connections can be garbage collected.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rdelillo
approved these changes
Oct 14, 2026
rdelillo
left a comment
Contributor
There was a problem hiding this comment.
LGTM, got the provided example working in a venv.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog Description
Added websockets and event hub to ayon api.
Additional review information
Added simple way how to start websocket communication. Also added helper EventHub that does handle registering of handler for events.
Almost same implementation of event hub was added to core in ynput/ayon-core#2178 . This is meant to replace that when needed version of AYON launcher with this python api is required by ayon-core addon.
Testing notes:
The easiest way is to get event hub from ayon api and register callbacks to known topics for example creation of folder.
Example
Resolves ynput/ayon-core#1386