loadero_python.resources.run_participant module

Loadero run participant resource.

Run participant resources is seperated into three parts

RunParticipantParams class describes run participant attributes

RunParticipantAPI class groups all API operations related to run participant.

RunParticipant class combined RunParticipantParams and RunParticipantAPI.

Single RunParticipant object coresponds to single run participant in Loadero.

class loadero_python.resources.run_participant.RunParticipant(run_participant_id: int | None = None, run_id: int | None = None, params: RunParticipantParams | None = None)[source]

Bases: LoaderoResource

RunParticipant class allows to perform read operations on Loadero run participant resources.

APIClient must be previously initialized with a valid Loadero access token.

The target Loadero run participant resource is determined by RunParticipantParams.

read() RunParticipant[source]

Reads information about an existing run participant.

Required attributes of params field that need to be populated, otherwise the method will raise an exception:

  • run_participant_id

  • run_id

Raises:

ValueError: If resource params do not sufficiently identify resource.

APIException: If API call fails.

Returns:

Test: Read run participants resource.

class loadero_python.resources.run_participant.RunParticipantAPI[source]

Bases: object

RunParticipantAPI defines Loadero API operations for run participant resources.

static read(params: RunParticipantParams) RunParticipantParams[source]

Read an existing run participant resource.

Args:

params (RunParticipantParams): Describes run participant resource to read.

Returns:

RunParticipantParams: Read run participant resource.

static read_all(run_id: int, query_params: QueryParams | None = None) PagedResponse[source]

Read all run participant resources.

Args:

run_id (int): Parent run resource id. query_params (QueryParams, optional): Describes query parameters.

Raises:

APIException: If API call fails.

Returns:

PagedResponse: Paged response of run participant resources.

static route(run_id: int, run_particpant_id: int | None = None) str[source]

Build run participant resource route

Args:

run_id (int): Run resource id.

run_particpant_id (int or None, optional): Run participant resource id. Defaults to None. If omitted the route will point to all run participant resources.

Returns:

str: Route to run participant resource/s.

class loadero_python.resources.run_participant.RunParticipantFilterKey(value)[source]

Bases: FilterKey

RunParticipantFilterKey is an enum of all filter keys for run participant read all API operation.

AUDIO_FEED = 'filter_audio_feed'
BROWSER = 'filter_browser'
GROUP_NAME = 'filter_group_name'
GROUP_NUM_FROM = 'filter_group_num_from'
GROUP_NUM_TO = 'filter_group_num_to'
LOCATION = 'filter_location'
NAME = 'filter_name'
NETWORK = 'filter_network'
NUM_FROM = 'filter_num_from'
NUM_TO = 'filter_num_to'
RECORD_AUDIO = 'filter_record_audio'
VIDEO_FEED = 'filter_video_feed'
class loadero_python.resources.run_participant.RunParticipantParams(run_participant_id: int | None = None, run_id: int | None = None)[source]

Bases: LoaderoResourceParams

RunParticipantParams represents Loadero RunParticipant resource attributes.

property audio_feed: AudioFeed

Audio feed of participant.

Returns:

AudioFeed: Audio feed of participant.

property browser: Browser

Browser of participant.

Returns:

Browser: Browser of participant.

property compute_unit: ComputeUnit

Compute unit of participant.

Returns:

ComputeUnit: Compute unit of participant.

property created: datetime

Time when run participant was created.

Returns:

datetime: Time when run participant was created.

property group_name: int

Name of the group that the participant is in.

Returns:

int: Name of the group that the participant is in.

property group_num: int

Group number in test that the participant is in.

Returns:

int: Group number in test that the participant is in.

property location: Location

Location of participant.

Returns:

Location: Location of participant.

property network: Network

Network of participant.

Returns:

Network: Network of participant.

property participant_name: str

Participants name.

Returns:

str: Participants name.

property participant_num: int

Participants number in group.

Returns:

int: Participants number in group.

property record_audio: bool

Flag indicating whether audio was recorded.

Returns:

bool: Flag indicating whether audio was recorded.

property updated: datetime

Time when run participant was last updated.

Returns:

datetime: Time when run participant was last updated.

property video_feed: VideoFeed

Video feed of participant.

Returns:

VideoFeed: Video feed of participant.

with_id(run_participant_id: int) RunParticipantParams[source]

Set run participant id.

Args:

run_participant_id (int): Run participant id.

Returns:

RunParticipantParams: Run participant params with set id.