User API Reference

The user API reference targets users who want to use Zambeze’s Python package for running their .

class zambeze.campaign.activities.shell.ShellActivity(name: str, files: list[str], command: str, arguments: list[str], logger: Logger | None = None, campaign_id: str | None = None, agent_id: str | None = None, message_id: str | None = None, **kwargs)

Bases: Activity

A Unix Shell script/command activity.

Parameters:
  • name (str) – Campaign activity name.

  • files (Optional[list[str]]) – List of file URIs.

  • command (Optional[str]) – Action’s command.

  • arguments (Optional[list[str]]) – List of arguments.

  • logger (Optional[logging.Logger]) – The logger where to log information/warning or errors.

activity_id: str | None
agent_id: str | None
arguments: list[str]
campaign_id: str | None
command: str | None
dest_directory: str | None
files: list[str]
generate_message() AbstractMessage
logger: Logger | None
message_id: str | None
override_existing: bool | None
source_file: str | None
class zambeze.campaign.campaign.Campaign(name: str, activities: list[Activity] | None = None, logger: Logger | None = None, force_login: bool = False)

Bases: object

A Scientific Campaign class to manage and dispatch campaign activities.

name

The name of the campaign.

Type:

str

campaign_id

A unique identifier for the campaign.

Type:

str

needs_globus_login

A flag indicating if Globus login is needed.

Type:

bool

activities

A list of activities associated with the campaign.

Type:

list[Activity]

_logger

Logger for logging information, warnings, and errors.

Type:

logging.Logger

add_activity(activity: Activity) None

Adds an activity to the campaign.

Parameters:

activity (Activity) – The activity to add to the campaign.

dispatch() None

Dispatches the set of current activities in the campaign.

result()
status()