Skip to content

Module yapapi.rest.activity

Classes

Activity

class Activity(
    _api:ya_activity.api.requestor_control_api.RequestorControlApi,
    _state:ya_activity.api.requestor_state_api.RequestorStateApi,
    activity_id:str
)

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as::

class Mapping(Generic[KT, VT]): def getitem(self, key: KT) -> VT: ... # Etc.

This class can then be used as follows::

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default

Ancestors (in MRO)

  • typing.AsyncContextManager
  • typing.Generic

Instance variables

id

Methods

send
def send(
    self,
    script:List[dict]
)
state
def state(
    self
) -> ya_activity.models.activity_state.ActivityState

ActivityService

class ActivityService(
    api_client:ya_activity.api_client.ApiClient
)

Methods

new_activity
def new_activity(
    self,
    agreement_id:str
) -> 'Activity'

Batch

class Batch(
    _api:ya_activity.api.requestor_control_api.RequestorControlApi,
    activity_id:str,
    batch_id:str,
    batch_size:int
)

Abstract base class for generic types.

A generic type is typically declared by inheriting from this class parameterized with one or more type variables. For example, a generic mapping type might be defined as::

class Mapping(Generic[KT, VT]): def getitem(self, key: KT) -> VT: ... # Etc.

This class can then be used as follows::

def lookup_name(mapping: Mapping[KT, VT], key: KT, default: VT) -> VT: try: return mapping[key] except KeyError: return default

Ancestors (in MRO)

  • typing.AsyncIterable
  • collections.abc.AsyncIterable
  • typing.Generic
  • collections.abc.Sized

Instance variables

id

CommandExecutionError

class CommandExecutionError(
    /,
    *args,
    **kwargs
)

Common base class for all non-exit exceptions.

Ancestors (in MRO)

  • builtins.Exception
  • builtins.BaseException

Class variables

args

Methods

with_traceback
def with_traceback(
    ...
)

Exception.with_traceback(tb) -- set self.traceback to tb and return self.

Result

class Result(
    idx:int,
    message:Union[str, NoneType]
)

Result(idx:int, message:Union[str, NoneType])