Project

General

Profile

Actions

Idea #9217

open

[SDKs] Define and document Python events interface

Added by Brett Smith over 8 years ago. Updated 9 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
-
Target version:
Start date:
Due date:
Story points:
-
Release:
Release relationship:
Auto

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.


Related issues

Related to Arvados - Idea #19825: Write docstrings for arvados.eventsResolvedBrett SmithActions
Follows (1 day) Arvados - Bug #9135: [SDKs] `arv ws -j` exits immediately with an errorResolvedBrett Smith05/06/2016Actions
Actions #1

Updated by Peter Amstutz almost 2 years ago

  • Release set to 60
Actions #2

Updated by Brett Smith almost 2 years ago

  • Related to Idea #19825: Write docstrings for arvados.events added
Actions #3

Updated by Peter Amstutz 9 months ago

  • Target version set to Future
Actions

Also available in: Atom PDF