Idea #9217
open[SDKs] Define and document Python events interface
Description
arvados.events provides an EventClient class to listen to Websockets; a PollClient class to get the same information by polling the logs.list method; and a subscribe method to get one or the other depending. Both classes provide subscribe, unsubscribe, run_forever, and close methods. (They also both provide run methods, but the semantics are completely different, so they're not really the same.) They also have a smattering of other public methods.
There's no documentation in the module about how you're supposed to use it. #9135-7 says you call subscribe
and then use the subset of common methods listed above, but you have to really read the source to figure out what those methods are.
Settle on the interface, and then document it. If we stick with the basic plan that users should use the common interface of EventClient and PollClient, help make that discoverable by marking unshared methods as private, with a leading underscore.
Updated by Brett Smith almost 2 years ago
- Related to Idea #19825: Write docstrings for arvados.events added