/  Python Yamcs Client  /  Activities

Activities

Activities are executable units of work within Yamcs. They provide a structured way to trigger commands, run scripts, or execute stacks.

The Python client allows you to define these activities programmatically and schedule them on the Yamcs Timeline.

Core Concepts

Each activity type inherits from the base Activity class. Yamcs currently supports three primary built-in types:

API Reference

class yamcs.client.Activity

Bases: object

Superclass for activities. Core implementations:

Note

This is an abstract base class. You should instantiate one of the subclasses below.

class yamcs.client.CommandActivity(command: str, args: ~typing.Mapping[str, ~typing.Any] = <factory>, extra: ~typing.Mapping[str, ~typing.Any] = <factory>, processor: str | None = None)

Bases: Activity

An activity that executes a single command

args: Mapping[str, Any]

Named arguments, if the command requires any

command: str

Qualified name of a command

extra: Mapping[str, Any]

Extra command options

processor: str | None = None

Optional processor name. If not provided, Yamcs defaults to any processor it can find with commanding enabled.

class yamcs.client.ScriptActivity(script: str, args: str | List[str] | None = None, processor: str | None = None, runner: str | None = None)

Bases: Activity

An activity that runs a script

args: str | List[str] | None = None

Optional script arguments, passed verbatim in the command line.

processor: str | None = None

Optional processor name. If provided, this is forwarded to the script as the environment variable YAMCS_PROCESSOR.

runner: str | None = None

Optional runner name. In case of multiple runners, use this field to control which one is to run this particular script.

script: str

Script identifier.

This should be the relative path to an an executable file in one of the search locations. When unconfigured, the default search location is etc/scripts/ relative to the Yamcs working directory.

class yamcs.client.StackActivity(bucket: str, stack: str, processor: str | None = None)

Bases: Activity

An activity for executing a stack

bucket: str

The name of the bucket containing the stack.

processor: str | None = None

Optional processor name. If not provided, Yamcs defaults to any processor it can find with commanding enabled.

stack: str

The name of the stack object inside the bucket.