Skip to content

iter_list_experiment_runs async

iter_list_experiment_runs(
    application_identifier: Identifier,
    experiment_definition_identifier: Identifier,
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    max_results: Optional[MaxResults] = None,
    next_token: Optional[NextToken] = None,
    status: Optional[ExperimentRunStatus] = None,
) -> AsyncIterator[ExperimentRunSummary]
Source code in docs_src/capo_appconfig/_services/async_app_config.py
async def iter_list_experiment_runs(
    self,
    application_identifier: "capo_appconfig.types.identifier.Identifier",
    experiment_definition_identifier: "capo_appconfig.types.identifier.Identifier",
    *,
    config_overrides: Optional[AsyncAppConfigClientConfig] = None,
    max_results: Optional["capo_appconfig.types.max_results.MaxResults"] = None,
    next_token: Optional["capo_appconfig.types.next_token.NextToken"] = None,
    status: Optional[
        "capo_appconfig.types.experiment_run_status.ExperimentRunStatus"
    ] = None,
) -> "AsyncIterator[capo_appconfig.types.experiment_run_summary.ExperimentRunSummary]":
    _token = next_token
    while True:
        _response = await self.list_experiment_runs(
            application_identifier,
            experiment_definition_identifier,
            config_overrides=config_overrides,
            max_results=max_results,
            next_token=_token,
            status=status,
        )
        _page = _resolve_path(_response, ("items",))
        for _item in _page or []:
            yield _item
        _token = _resolve_path(_response, ("next_token",))
        if not _token:
            break