runloop_api_client 1.5.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- runloop_api_client/__init__.py +95 -0
- runloop_api_client/_base_client.py +2127 -0
- runloop_api_client/_client.py +866 -0
- runloop_api_client/_compat.py +219 -0
- runloop_api_client/_constants.py +23 -0
- runloop_api_client/_exceptions.py +108 -0
- runloop_api_client/_files.py +123 -0
- runloop_api_client/_models.py +872 -0
- runloop_api_client/_qs.py +150 -0
- runloop_api_client/_resource.py +43 -0
- runloop_api_client/_response.py +832 -0
- runloop_api_client/_streaming.py +518 -0
- runloop_api_client/_types.py +270 -0
- runloop_api_client/_utils/__init__.py +65 -0
- runloop_api_client/_utils/_compat.py +45 -0
- runloop_api_client/_utils/_datetime_parse.py +136 -0
- runloop_api_client/_utils/_json.py +35 -0
- runloop_api_client/_utils/_logs.py +25 -0
- runloop_api_client/_utils/_proxy.py +65 -0
- runloop_api_client/_utils/_reflection.py +42 -0
- runloop_api_client/_utils/_resources_proxy.py +24 -0
- runloop_api_client/_utils/_streams.py +12 -0
- runloop_api_client/_utils/_sync.py +58 -0
- runloop_api_client/_utils/_transform.py +457 -0
- runloop_api_client/_utils/_typing.py +156 -0
- runloop_api_client/_utils/_utils.py +421 -0
- runloop_api_client/_utils/_validation.py +31 -0
- runloop_api_client/_version.py +4 -0
- runloop_api_client/lib/.keep +4 -0
- runloop_api_client/lib/__init__.py +3 -0
- runloop_api_client/lib/_ignore.py +496 -0
- runloop_api_client/lib/context_loader.py +78 -0
- runloop_api_client/lib/polling.py +75 -0
- runloop_api_client/lib/polling_async.py +60 -0
- runloop_api_client/pagination.py +986 -0
- runloop_api_client/py.typed +0 -0
- runloop_api_client/resources/__init__.py +173 -0
- runloop_api_client/resources/agents.py +431 -0
- runloop_api_client/resources/benchmark_jobs.py +394 -0
- runloop_api_client/resources/benchmark_runs.py +595 -0
- runloop_api_client/resources/benchmarks.py +1085 -0
- runloop_api_client/resources/blueprints.py +1563 -0
- runloop_api_client/resources/devboxes/__init__.py +89 -0
- runloop_api_client/resources/devboxes/browsers.py +267 -0
- runloop_api_client/resources/devboxes/computers.py +648 -0
- runloop_api_client/resources/devboxes/devboxes.py +3784 -0
- runloop_api_client/resources/devboxes/disk_snapshots.py +602 -0
- runloop_api_client/resources/devboxes/executions.py +1212 -0
- runloop_api_client/resources/devboxes/logs.py +197 -0
- runloop_api_client/resources/gateway_configs.py +658 -0
- runloop_api_client/resources/network_policies.py +680 -0
- runloop_api_client/resources/objects.py +870 -0
- runloop_api_client/resources/repositories.py +918 -0
- runloop_api_client/resources/scenarios/__init__.py +47 -0
- runloop_api_client/resources/scenarios/runs.py +973 -0
- runloop_api_client/resources/scenarios/scenarios.py +1101 -0
- runloop_api_client/resources/scenarios/scorers.py +629 -0
- runloop_api_client/resources/secrets.py +500 -0
- runloop_api_client/sdk/__init__.py +117 -0
- runloop_api_client/sdk/_helpers.py +49 -0
- runloop_api_client/sdk/_types.py +264 -0
- runloop_api_client/sdk/agent.py +70 -0
- runloop_api_client/sdk/async_.py +1036 -0
- runloop_api_client/sdk/async_agent.py +70 -0
- runloop_api_client/sdk/async_benchmark.py +169 -0
- runloop_api_client/sdk/async_benchmark_run.py +127 -0
- runloop_api_client/sdk/async_blueprint.py +104 -0
- runloop_api_client/sdk/async_devbox.py +797 -0
- runloop_api_client/sdk/async_execution.py +144 -0
- runloop_api_client/sdk/async_execution_result.py +175 -0
- runloop_api_client/sdk/async_network_policy.py +80 -0
- runloop_api_client/sdk/async_scenario.py +118 -0
- runloop_api_client/sdk/async_scenario_builder.py +480 -0
- runloop_api_client/sdk/async_scenario_run.py +242 -0
- runloop_api_client/sdk/async_scorer.py +77 -0
- runloop_api_client/sdk/async_snapshot.py +125 -0
- runloop_api_client/sdk/async_storage_object.py +188 -0
- runloop_api_client/sdk/benchmark.py +167 -0
- runloop_api_client/sdk/benchmark_run.py +127 -0
- runloop_api_client/sdk/blueprint.py +104 -0
- runloop_api_client/sdk/devbox.py +800 -0
- runloop_api_client/sdk/execution.py +132 -0
- runloop_api_client/sdk/execution_result.py +173 -0
- runloop_api_client/sdk/network_policy.py +80 -0
- runloop_api_client/sdk/scenario.py +118 -0
- runloop_api_client/sdk/scenario_builder.py +480 -0
- runloop_api_client/sdk/scenario_run.py +242 -0
- runloop_api_client/sdk/scorer.py +77 -0
- runloop_api_client/sdk/snapshot.py +125 -0
- runloop_api_client/sdk/storage_object.py +188 -0
- runloop_api_client/sdk/sync.py +1061 -0
- runloop_api_client/types/__init__.py +130 -0
- runloop_api_client/types/agent_create_params.py +21 -0
- runloop_api_client/types/agent_list_params.py +27 -0
- runloop_api_client/types/agent_list_view.py +24 -0
- runloop_api_client/types/agent_view.py +30 -0
- runloop_api_client/types/benchmark_create_params.py +40 -0
- runloop_api_client/types/benchmark_definitions_params.py +15 -0
- runloop_api_client/types/benchmark_job_create_params.py +220 -0
- runloop_api_client/types/benchmark_job_list_params.py +18 -0
- runloop_api_client/types/benchmark_job_list_view.py +19 -0
- runloop_api_client/types/benchmark_job_view.py +344 -0
- runloop_api_client/types/benchmark_list_params.py +18 -0
- runloop_api_client/types/benchmark_list_public_params.py +15 -0
- runloop_api_client/types/benchmark_run_list_params.py +21 -0
- runloop_api_client/types/benchmark_run_list_scenario_runs_params.py +18 -0
- runloop_api_client/types/benchmark_run_list_view.py +19 -0
- runloop_api_client/types/benchmark_run_view.py +58 -0
- runloop_api_client/types/benchmark_start_run_params.py +29 -0
- runloop_api_client/types/benchmark_update_params.py +42 -0
- runloop_api_client/types/benchmark_update_scenarios_params.py +18 -0
- runloop_api_client/types/benchmark_view.py +49 -0
- runloop_api_client/types/blueprint_build_log.py +16 -0
- runloop_api_client/types/blueprint_build_logs_list_view.py +16 -0
- runloop_api_client/types/blueprint_build_parameters.py +119 -0
- runloop_api_client/types/blueprint_create_from_inspection_params.py +49 -0
- runloop_api_client/types/blueprint_create_params.py +121 -0
- runloop_api_client/types/blueprint_list_params.py +21 -0
- runloop_api_client/types/blueprint_list_public_params.py +21 -0
- runloop_api_client/types/blueprint_list_view.py +19 -0
- runloop_api_client/types/blueprint_preview_params.py +121 -0
- runloop_api_client/types/blueprint_preview_view.py +10 -0
- runloop_api_client/types/blueprint_view.py +93 -0
- runloop_api_client/types/devbox_async_execution_detail_view.py +46 -0
- runloop_api_client/types/devbox_create_params.py +124 -0
- runloop_api_client/types/devbox_create_ssh_key_response.py +19 -0
- runloop_api_client/types/devbox_create_tunnel_params.py +12 -0
- runloop_api_client/types/devbox_download_file_params.py +15 -0
- runloop_api_client/types/devbox_enable_tunnel_params.py +13 -0
- runloop_api_client/types/devbox_execute_async_params.py +33 -0
- runloop_api_client/types/devbox_execute_params.py +37 -0
- runloop_api_client/types/devbox_execute_sync_params.py +31 -0
- runloop_api_client/types/devbox_execution_detail_view.py +24 -0
- runloop_api_client/types/devbox_list_disk_snapshots_params.py +32 -0
- runloop_api_client/types/devbox_list_params.py +20 -0
- runloop_api_client/types/devbox_list_view.py +19 -0
- runloop_api_client/types/devbox_read_file_contents_params.py +15 -0
- runloop_api_client/types/devbox_read_file_contents_response.py +7 -0
- runloop_api_client/types/devbox_remove_tunnel_params.py +12 -0
- runloop_api_client/types/devbox_send_std_in_result.py +16 -0
- runloop_api_client/types/devbox_snapshot_disk_async_params.py +19 -0
- runloop_api_client/types/devbox_snapshot_disk_params.py +19 -0
- runloop_api_client/types/devbox_snapshot_list_view.py +19 -0
- runloop_api_client/types/devbox_snapshot_view.py +30 -0
- runloop_api_client/types/devbox_tunnel_view.py +16 -0
- runloop_api_client/types/devbox_update_params.py +16 -0
- runloop_api_client/types/devbox_upload_file_params.py +19 -0
- runloop_api_client/types/devbox_view.py +121 -0
- runloop_api_client/types/devbox_wait_for_command_params.py +28 -0
- runloop_api_client/types/devbox_write_file_contents_params.py +18 -0
- runloop_api_client/types/devboxes/__init__.py +33 -0
- runloop_api_client/types/devboxes/browser_create_params.py +13 -0
- runloop_api_client/types/devboxes/browser_view.py +29 -0
- runloop_api_client/types/devboxes/computer_create_params.py +26 -0
- runloop_api_client/types/devboxes/computer_keyboard_interaction_params.py +16 -0
- runloop_api_client/types/devboxes/computer_keyboard_interaction_response.py +15 -0
- runloop_api_client/types/devboxes/computer_mouse_interaction_params.py +35 -0
- runloop_api_client/types/devboxes/computer_mouse_interaction_response.py +15 -0
- runloop_api_client/types/devboxes/computer_screen_interaction_params.py +12 -0
- runloop_api_client/types/devboxes/computer_screen_interaction_response.py +15 -0
- runloop_api_client/types/devboxes/computer_view.py +23 -0
- runloop_api_client/types/devboxes/devbox_logs_list_view.py +39 -0
- runloop_api_client/types/devboxes/devbox_snapshot_async_status_view.py +20 -0
- runloop_api_client/types/devboxes/disk_snapshot_list_params.py +32 -0
- runloop_api_client/types/devboxes/disk_snapshot_update_params.py +19 -0
- runloop_api_client/types/devboxes/execution_execute_async_params.py +31 -0
- runloop_api_client/types/devboxes/execution_execute_sync_params.py +31 -0
- runloop_api_client/types/devboxes/execution_kill_params.py +18 -0
- runloop_api_client/types/devboxes/execution_retrieve_params.py +14 -0
- runloop_api_client/types/devboxes/execution_send_std_in_params.py +18 -0
- runloop_api_client/types/devboxes/execution_stream_stderr_updates_params.py +17 -0
- runloop_api_client/types/devboxes/execution_stream_stdout_updates_params.py +17 -0
- runloop_api_client/types/devboxes/execution_update_chunk.py +15 -0
- runloop_api_client/types/devboxes/log_list_params.py +15 -0
- runloop_api_client/types/gateway_config_create_params.py +41 -0
- runloop_api_client/types/gateway_config_list_params.py +21 -0
- runloop_api_client/types/gateway_config_list_view.py +21 -0
- runloop_api_client/types/gateway_config_update_params.py +32 -0
- runloop_api_client/types/gateway_config_view.py +47 -0
- runloop_api_client/types/input_context.py +19 -0
- runloop_api_client/types/input_context_param.py +20 -0
- runloop_api_client/types/input_context_update_param.py +16 -0
- runloop_api_client/types/inspection_source_param.py +18 -0
- runloop_api_client/types/network_policy_create_params.py +40 -0
- runloop_api_client/types/network_policy_list_params.py +21 -0
- runloop_api_client/types/network_policy_list_view.py +21 -0
- runloop_api_client/types/network_policy_update_params.py +30 -0
- runloop_api_client/types/network_policy_view.py +52 -0
- runloop_api_client/types/object_create_params.py +30 -0
- runloop_api_client/types/object_download_params.py +12 -0
- runloop_api_client/types/object_download_url_view.py +12 -0
- runloop_api_client/types/object_list_params.py +27 -0
- runloop_api_client/types/object_list_public_params.py +27 -0
- runloop_api_client/types/object_list_view.py +24 -0
- runloop_api_client/types/object_view.py +36 -0
- runloop_api_client/types/repository_connection_list_view.py +19 -0
- runloop_api_client/types/repository_connection_view.py +18 -0
- runloop_api_client/types/repository_create_params.py +22 -0
- runloop_api_client/types/repository_inspect_params.py +13 -0
- runloop_api_client/types/repository_inspection_details.py +83 -0
- runloop_api_client/types/repository_inspection_list_view.py +13 -0
- runloop_api_client/types/repository_list_params.py +21 -0
- runloop_api_client/types/repository_manifest_view.py +174 -0
- runloop_api_client/types/repository_refresh_params.py +16 -0
- runloop_api_client/types/scenario_create_params.py +53 -0
- runloop_api_client/types/scenario_definition_list_view.py +19 -0
- runloop_api_client/types/scenario_environment.py +29 -0
- runloop_api_client/types/scenario_environment_param.py +31 -0
- runloop_api_client/types/scenario_list_params.py +24 -0
- runloop_api_client/types/scenario_list_public_params.py +18 -0
- runloop_api_client/types/scenario_run_list_view.py +19 -0
- runloop_api_client/types/scenario_run_view.py +55 -0
- runloop_api_client/types/scenario_start_run_params.py +30 -0
- runloop_api_client/types/scenario_update_params.py +49 -0
- runloop_api_client/types/scenario_view.py +61 -0
- runloop_api_client/types/scenarios/__init__.py +14 -0
- runloop_api_client/types/scenarios/run_list_params.py +27 -0
- runloop_api_client/types/scenarios/scorer_create_params.py +18 -0
- runloop_api_client/types/scenarios/scorer_create_response.py +18 -0
- runloop_api_client/types/scenarios/scorer_list_params.py +15 -0
- runloop_api_client/types/scenarios/scorer_list_response.py +18 -0
- runloop_api_client/types/scenarios/scorer_retrieve_response.py +18 -0
- runloop_api_client/types/scenarios/scorer_update_params.py +18 -0
- runloop_api_client/types/scenarios/scorer_update_response.py +18 -0
- runloop_api_client/types/scenarios/scorer_validate_params.py +17 -0
- runloop_api_client/types/scenarios/scorer_validate_response.py +23 -0
- runloop_api_client/types/scoring_contract.py +17 -0
- runloop_api_client/types/scoring_contract_param.py +19 -0
- runloop_api_client/types/scoring_contract_result_view.py +20 -0
- runloop_api_client/types/scoring_contract_update_param.py +15 -0
- runloop_api_client/types/scoring_function.py +157 -0
- runloop_api_client/types/scoring_function_param.py +153 -0
- runloop_api_client/types/scoring_function_result_view.py +25 -0
- runloop_api_client/types/secret_create_params.py +23 -0
- runloop_api_client/types/secret_list_params.py +12 -0
- runloop_api_client/types/secret_list_view.py +24 -0
- runloop_api_client/types/secret_update_params.py +16 -0
- runloop_api_client/types/secret_view.py +26 -0
- runloop_api_client/types/shared/__init__.py +10 -0
- runloop_api_client/types/shared/after_idle.py +15 -0
- runloop_api_client/types/shared/agent_mount.py +31 -0
- runloop_api_client/types/shared/agent_source.py +75 -0
- runloop_api_client/types/shared/code_mount_parameters.py +24 -0
- runloop_api_client/types/shared/launch_parameters.py +86 -0
- runloop_api_client/types/shared/mount.py +43 -0
- runloop_api_client/types/shared/object_mount.py +21 -0
- runloop_api_client/types/shared/run_profile.py +37 -0
- runloop_api_client/types/shared_params/__init__.py +10 -0
- runloop_api_client/types/shared_params/after_idle.py +15 -0
- runloop_api_client/types/shared_params/agent_mount.py +31 -0
- runloop_api_client/types/shared_params/agent_source.py +78 -0
- runloop_api_client/types/shared_params/code_mount_parameters.py +25 -0
- runloop_api_client/types/shared_params/launch_parameters.py +88 -0
- runloop_api_client/types/shared_params/mount.py +43 -0
- runloop_api_client/types/shared_params/object_mount.py +21 -0
- runloop_api_client/types/shared_params/run_profile.py +38 -0
- runloop_api_client/types/tunnel_view.py +34 -0
- runloop_api_client-1.5.1.dist-info/METADATA +522 -0
- runloop_api_client-1.5.1.dist-info/RECORD +261 -0
- runloop_api_client-1.5.1.dist-info/WHEEL +4 -0
- runloop_api_client-1.5.1.dist-info/licenses/LICENSE +7 -0
|
@@ -0,0 +1,866 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import os
|
|
6
|
+
from typing import TYPE_CHECKING, Any, Mapping
|
|
7
|
+
from typing_extensions import Self, override
|
|
8
|
+
|
|
9
|
+
import httpx
|
|
10
|
+
|
|
11
|
+
from . import _exceptions
|
|
12
|
+
from ._qs import Querystring
|
|
13
|
+
from ._types import (
|
|
14
|
+
Omit,
|
|
15
|
+
Timeout,
|
|
16
|
+
NotGiven,
|
|
17
|
+
Transport,
|
|
18
|
+
ProxiesTypes,
|
|
19
|
+
RequestOptions,
|
|
20
|
+
not_given,
|
|
21
|
+
)
|
|
22
|
+
from ._utils import is_given, get_async_library
|
|
23
|
+
from ._compat import cached_property
|
|
24
|
+
from ._version import __version__
|
|
25
|
+
from ._streaming import Stream as Stream, AsyncStream as AsyncStream
|
|
26
|
+
from ._exceptions import RunloopError, APIStatusError
|
|
27
|
+
from ._base_client import (
|
|
28
|
+
DEFAULT_MAX_RETRIES,
|
|
29
|
+
SyncAPIClient,
|
|
30
|
+
AsyncAPIClient,
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
if TYPE_CHECKING:
|
|
34
|
+
from .resources import (
|
|
35
|
+
agents,
|
|
36
|
+
objects,
|
|
37
|
+
secrets,
|
|
38
|
+
devboxes,
|
|
39
|
+
scenarios,
|
|
40
|
+
benchmarks,
|
|
41
|
+
blueprints,
|
|
42
|
+
repositories,
|
|
43
|
+
benchmark_jobs,
|
|
44
|
+
benchmark_runs,
|
|
45
|
+
gateway_configs,
|
|
46
|
+
network_policies,
|
|
47
|
+
)
|
|
48
|
+
from .resources.agents import AgentsResource, AsyncAgentsResource
|
|
49
|
+
from .resources.objects import ObjectsResource, AsyncObjectsResource
|
|
50
|
+
from .resources.secrets import SecretsResource, AsyncSecretsResource
|
|
51
|
+
from .resources.benchmarks import BenchmarksResource, AsyncBenchmarksResource
|
|
52
|
+
from .resources.blueprints import BlueprintsResource, AsyncBlueprintsResource
|
|
53
|
+
from .resources.repositories import RepositoriesResource, AsyncRepositoriesResource
|
|
54
|
+
from .resources.benchmark_jobs import BenchmarkJobsResource, AsyncBenchmarkJobsResource
|
|
55
|
+
from .resources.benchmark_runs import BenchmarkRunsResource, AsyncBenchmarkRunsResource
|
|
56
|
+
from .resources.gateway_configs import GatewayConfigsResource, AsyncGatewayConfigsResource
|
|
57
|
+
from .resources.network_policies import NetworkPoliciesResource, AsyncNetworkPoliciesResource
|
|
58
|
+
from .resources.devboxes.devboxes import DevboxesResource, AsyncDevboxesResource
|
|
59
|
+
from .resources.scenarios.scenarios import ScenariosResource, AsyncScenariosResource
|
|
60
|
+
|
|
61
|
+
__all__ = ["Timeout", "Transport", "ProxiesTypes", "RequestOptions", "Runloop", "AsyncRunloop", "Client", "AsyncClient"]
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class Runloop(SyncAPIClient):
|
|
65
|
+
# client options
|
|
66
|
+
bearer_token: str
|
|
67
|
+
|
|
68
|
+
def __init__(
|
|
69
|
+
self,
|
|
70
|
+
*,
|
|
71
|
+
bearer_token: str | None = None,
|
|
72
|
+
base_url: str | httpx.URL | None = None,
|
|
73
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
74
|
+
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
75
|
+
default_headers: Mapping[str, str] | None = None,
|
|
76
|
+
default_query: Mapping[str, object] | None = None,
|
|
77
|
+
# Configure a custom httpx client.
|
|
78
|
+
# We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`.
|
|
79
|
+
# See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details.
|
|
80
|
+
http_client: httpx.Client | None = None,
|
|
81
|
+
# Enable or disable schema validation for data returned by the API.
|
|
82
|
+
# When enabled an error APIResponseValidationError is raised
|
|
83
|
+
# if the API responds with invalid data for the expected schema.
|
|
84
|
+
#
|
|
85
|
+
# This parameter may be removed or changed in the future.
|
|
86
|
+
# If you rely on this feature, please open a GitHub issue
|
|
87
|
+
# outlining your use-case to help us decide if it should be
|
|
88
|
+
# part of our public interface in the future.
|
|
89
|
+
_strict_response_validation: bool = False,
|
|
90
|
+
) -> None:
|
|
91
|
+
"""Construct a new synchronous Runloop client instance.
|
|
92
|
+
|
|
93
|
+
This automatically infers the `bearer_token` argument from the `RUNLOOP_API_KEY` environment variable if it is not provided.
|
|
94
|
+
"""
|
|
95
|
+
if bearer_token is None:
|
|
96
|
+
bearer_token = os.environ.get("RUNLOOP_API_KEY")
|
|
97
|
+
if bearer_token is None:
|
|
98
|
+
raise RunloopError(
|
|
99
|
+
"The bearer_token client option must be set either by passing bearer_token to the client or by setting the RUNLOOP_API_KEY environment variable"
|
|
100
|
+
)
|
|
101
|
+
self.bearer_token = bearer_token
|
|
102
|
+
|
|
103
|
+
if base_url is None:
|
|
104
|
+
base_url = os.environ.get("RUNLOOP_BASE_URL")
|
|
105
|
+
if base_url is None:
|
|
106
|
+
base_url = f"https://api.runloop.ai"
|
|
107
|
+
|
|
108
|
+
super().__init__(
|
|
109
|
+
version=__version__,
|
|
110
|
+
base_url=base_url,
|
|
111
|
+
max_retries=max_retries,
|
|
112
|
+
timeout=timeout,
|
|
113
|
+
http_client=http_client,
|
|
114
|
+
custom_headers=default_headers,
|
|
115
|
+
custom_query=default_query,
|
|
116
|
+
_strict_response_validation=_strict_response_validation,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
self._idempotency_header = "x-request-id"
|
|
120
|
+
|
|
121
|
+
@cached_property
|
|
122
|
+
def benchmarks(self) -> BenchmarksResource:
|
|
123
|
+
from .resources.benchmarks import BenchmarksResource
|
|
124
|
+
|
|
125
|
+
return BenchmarksResource(self)
|
|
126
|
+
|
|
127
|
+
@cached_property
|
|
128
|
+
def benchmark_runs(self) -> BenchmarkRunsResource:
|
|
129
|
+
from .resources.benchmark_runs import BenchmarkRunsResource
|
|
130
|
+
|
|
131
|
+
return BenchmarkRunsResource(self)
|
|
132
|
+
|
|
133
|
+
@cached_property
|
|
134
|
+
def benchmark_jobs(self) -> BenchmarkJobsResource:
|
|
135
|
+
from .resources.benchmark_jobs import BenchmarkJobsResource
|
|
136
|
+
|
|
137
|
+
return BenchmarkJobsResource(self)
|
|
138
|
+
|
|
139
|
+
@cached_property
|
|
140
|
+
def agents(self) -> AgentsResource:
|
|
141
|
+
from .resources.agents import AgentsResource
|
|
142
|
+
|
|
143
|
+
return AgentsResource(self)
|
|
144
|
+
|
|
145
|
+
@cached_property
|
|
146
|
+
def blueprints(self) -> BlueprintsResource:
|
|
147
|
+
from .resources.blueprints import BlueprintsResource
|
|
148
|
+
|
|
149
|
+
return BlueprintsResource(self)
|
|
150
|
+
|
|
151
|
+
@cached_property
|
|
152
|
+
def devboxes(self) -> DevboxesResource:
|
|
153
|
+
from .resources.devboxes import DevboxesResource
|
|
154
|
+
|
|
155
|
+
return DevboxesResource(self)
|
|
156
|
+
|
|
157
|
+
@cached_property
|
|
158
|
+
def scenarios(self) -> ScenariosResource:
|
|
159
|
+
from .resources.scenarios import ScenariosResource
|
|
160
|
+
|
|
161
|
+
return ScenariosResource(self)
|
|
162
|
+
|
|
163
|
+
@cached_property
|
|
164
|
+
def objects(self) -> ObjectsResource:
|
|
165
|
+
from .resources.objects import ObjectsResource
|
|
166
|
+
|
|
167
|
+
return ObjectsResource(self)
|
|
168
|
+
|
|
169
|
+
@cached_property
|
|
170
|
+
def repositories(self) -> RepositoriesResource:
|
|
171
|
+
from .resources.repositories import RepositoriesResource
|
|
172
|
+
|
|
173
|
+
return RepositoriesResource(self)
|
|
174
|
+
|
|
175
|
+
@cached_property
|
|
176
|
+
def secrets(self) -> SecretsResource:
|
|
177
|
+
from .resources.secrets import SecretsResource
|
|
178
|
+
|
|
179
|
+
return SecretsResource(self)
|
|
180
|
+
|
|
181
|
+
@cached_property
|
|
182
|
+
def network_policies(self) -> NetworkPoliciesResource:
|
|
183
|
+
from .resources.network_policies import NetworkPoliciesResource
|
|
184
|
+
|
|
185
|
+
return NetworkPoliciesResource(self)
|
|
186
|
+
|
|
187
|
+
@cached_property
|
|
188
|
+
def gateway_configs(self) -> GatewayConfigsResource:
|
|
189
|
+
from .resources.gateway_configs import GatewayConfigsResource
|
|
190
|
+
|
|
191
|
+
return GatewayConfigsResource(self)
|
|
192
|
+
|
|
193
|
+
@cached_property
|
|
194
|
+
def with_raw_response(self) -> RunloopWithRawResponse:
|
|
195
|
+
return RunloopWithRawResponse(self)
|
|
196
|
+
|
|
197
|
+
@cached_property
|
|
198
|
+
def with_streaming_response(self) -> RunloopWithStreamedResponse:
|
|
199
|
+
return RunloopWithStreamedResponse(self)
|
|
200
|
+
|
|
201
|
+
@property
|
|
202
|
+
@override
|
|
203
|
+
def qs(self) -> Querystring:
|
|
204
|
+
return Querystring(array_format="comma")
|
|
205
|
+
|
|
206
|
+
@property
|
|
207
|
+
@override
|
|
208
|
+
def auth_headers(self) -> dict[str, str]:
|
|
209
|
+
bearer_token = self.bearer_token
|
|
210
|
+
return {"Authorization": f"Bearer {bearer_token}"}
|
|
211
|
+
|
|
212
|
+
@property
|
|
213
|
+
@override
|
|
214
|
+
def default_headers(self) -> dict[str, str | Omit]:
|
|
215
|
+
return {
|
|
216
|
+
**super().default_headers,
|
|
217
|
+
"X-Stainless-Async": "false",
|
|
218
|
+
**self._custom_headers,
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
def copy(
|
|
222
|
+
self,
|
|
223
|
+
*,
|
|
224
|
+
bearer_token: str | None = None,
|
|
225
|
+
base_url: str | httpx.URL | None = None,
|
|
226
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
227
|
+
http_client: httpx.Client | None = None,
|
|
228
|
+
max_retries: int | NotGiven = not_given,
|
|
229
|
+
default_headers: Mapping[str, str] | None = None,
|
|
230
|
+
set_default_headers: Mapping[str, str] | None = None,
|
|
231
|
+
default_query: Mapping[str, object] | None = None,
|
|
232
|
+
set_default_query: Mapping[str, object] | None = None,
|
|
233
|
+
_extra_kwargs: Mapping[str, Any] = {},
|
|
234
|
+
) -> Self:
|
|
235
|
+
"""
|
|
236
|
+
Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
237
|
+
"""
|
|
238
|
+
if default_headers is not None and set_default_headers is not None:
|
|
239
|
+
raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive")
|
|
240
|
+
|
|
241
|
+
if default_query is not None and set_default_query is not None:
|
|
242
|
+
raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive")
|
|
243
|
+
|
|
244
|
+
headers = self._custom_headers
|
|
245
|
+
if default_headers is not None:
|
|
246
|
+
headers = {**headers, **default_headers}
|
|
247
|
+
elif set_default_headers is not None:
|
|
248
|
+
headers = set_default_headers
|
|
249
|
+
|
|
250
|
+
params = self._custom_query
|
|
251
|
+
if default_query is not None:
|
|
252
|
+
params = {**params, **default_query}
|
|
253
|
+
elif set_default_query is not None:
|
|
254
|
+
params = set_default_query
|
|
255
|
+
|
|
256
|
+
http_client = http_client or self._client
|
|
257
|
+
return self.__class__(
|
|
258
|
+
bearer_token=bearer_token or self.bearer_token,
|
|
259
|
+
base_url=base_url or self.base_url,
|
|
260
|
+
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
|
|
261
|
+
http_client=http_client,
|
|
262
|
+
max_retries=max_retries if is_given(max_retries) else self.max_retries,
|
|
263
|
+
default_headers=headers,
|
|
264
|
+
default_query=params,
|
|
265
|
+
**_extra_kwargs,
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
# Alias for `copy` for nicer inline usage, e.g.
|
|
269
|
+
# client.with_options(timeout=10).foo.create(...)
|
|
270
|
+
with_options = copy
|
|
271
|
+
|
|
272
|
+
@override
|
|
273
|
+
def _make_status_error(
|
|
274
|
+
self,
|
|
275
|
+
err_msg: str,
|
|
276
|
+
*,
|
|
277
|
+
body: object,
|
|
278
|
+
response: httpx.Response,
|
|
279
|
+
) -> APIStatusError:
|
|
280
|
+
if response.status_code == 400:
|
|
281
|
+
return _exceptions.BadRequestError(err_msg, response=response, body=body)
|
|
282
|
+
|
|
283
|
+
if response.status_code == 401:
|
|
284
|
+
return _exceptions.AuthenticationError(err_msg, response=response, body=body)
|
|
285
|
+
|
|
286
|
+
if response.status_code == 403:
|
|
287
|
+
return _exceptions.PermissionDeniedError(err_msg, response=response, body=body)
|
|
288
|
+
|
|
289
|
+
if response.status_code == 404:
|
|
290
|
+
return _exceptions.NotFoundError(err_msg, response=response, body=body)
|
|
291
|
+
|
|
292
|
+
if response.status_code == 409:
|
|
293
|
+
return _exceptions.ConflictError(err_msg, response=response, body=body)
|
|
294
|
+
|
|
295
|
+
if response.status_code == 422:
|
|
296
|
+
return _exceptions.UnprocessableEntityError(err_msg, response=response, body=body)
|
|
297
|
+
|
|
298
|
+
if response.status_code == 429:
|
|
299
|
+
return _exceptions.RateLimitError(err_msg, response=response, body=body)
|
|
300
|
+
|
|
301
|
+
if response.status_code >= 500:
|
|
302
|
+
return _exceptions.InternalServerError(err_msg, response=response, body=body)
|
|
303
|
+
return APIStatusError(err_msg, response=response, body=body)
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
class AsyncRunloop(AsyncAPIClient):
|
|
307
|
+
# client options
|
|
308
|
+
bearer_token: str
|
|
309
|
+
|
|
310
|
+
def __init__(
|
|
311
|
+
self,
|
|
312
|
+
*,
|
|
313
|
+
bearer_token: str | None = None,
|
|
314
|
+
base_url: str | httpx.URL | None = None,
|
|
315
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
316
|
+
max_retries: int = DEFAULT_MAX_RETRIES,
|
|
317
|
+
default_headers: Mapping[str, str] | None = None,
|
|
318
|
+
default_query: Mapping[str, object] | None = None,
|
|
319
|
+
# Configure a custom httpx client.
|
|
320
|
+
# We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`.
|
|
321
|
+
# See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details.
|
|
322
|
+
http_client: httpx.AsyncClient | None = None,
|
|
323
|
+
# Enable or disable schema validation for data returned by the API.
|
|
324
|
+
# When enabled an error APIResponseValidationError is raised
|
|
325
|
+
# if the API responds with invalid data for the expected schema.
|
|
326
|
+
#
|
|
327
|
+
# This parameter may be removed or changed in the future.
|
|
328
|
+
# If you rely on this feature, please open a GitHub issue
|
|
329
|
+
# outlining your use-case to help us decide if it should be
|
|
330
|
+
# part of our public interface in the future.
|
|
331
|
+
_strict_response_validation: bool = False,
|
|
332
|
+
) -> None:
|
|
333
|
+
"""Construct a new async AsyncRunloop client instance.
|
|
334
|
+
|
|
335
|
+
This automatically infers the `bearer_token` argument from the `RUNLOOP_API_KEY` environment variable if it is not provided.
|
|
336
|
+
"""
|
|
337
|
+
if bearer_token is None:
|
|
338
|
+
bearer_token = os.environ.get("RUNLOOP_API_KEY")
|
|
339
|
+
if bearer_token is None:
|
|
340
|
+
raise RunloopError(
|
|
341
|
+
"The bearer_token client option must be set either by passing bearer_token to the client or by setting the RUNLOOP_API_KEY environment variable"
|
|
342
|
+
)
|
|
343
|
+
self.bearer_token = bearer_token
|
|
344
|
+
|
|
345
|
+
if base_url is None:
|
|
346
|
+
base_url = os.environ.get("RUNLOOP_BASE_URL")
|
|
347
|
+
if base_url is None:
|
|
348
|
+
base_url = f"https://api.runloop.ai"
|
|
349
|
+
|
|
350
|
+
super().__init__(
|
|
351
|
+
version=__version__,
|
|
352
|
+
base_url=base_url,
|
|
353
|
+
max_retries=max_retries,
|
|
354
|
+
timeout=timeout,
|
|
355
|
+
http_client=http_client,
|
|
356
|
+
custom_headers=default_headers,
|
|
357
|
+
custom_query=default_query,
|
|
358
|
+
_strict_response_validation=_strict_response_validation,
|
|
359
|
+
)
|
|
360
|
+
|
|
361
|
+
self._idempotency_header = "x-request-id"
|
|
362
|
+
|
|
363
|
+
@cached_property
|
|
364
|
+
def benchmarks(self) -> AsyncBenchmarksResource:
|
|
365
|
+
from .resources.benchmarks import AsyncBenchmarksResource
|
|
366
|
+
|
|
367
|
+
return AsyncBenchmarksResource(self)
|
|
368
|
+
|
|
369
|
+
@cached_property
|
|
370
|
+
def benchmark_runs(self) -> AsyncBenchmarkRunsResource:
|
|
371
|
+
from .resources.benchmark_runs import AsyncBenchmarkRunsResource
|
|
372
|
+
|
|
373
|
+
return AsyncBenchmarkRunsResource(self)
|
|
374
|
+
|
|
375
|
+
@cached_property
|
|
376
|
+
def benchmark_jobs(self) -> AsyncBenchmarkJobsResource:
|
|
377
|
+
from .resources.benchmark_jobs import AsyncBenchmarkJobsResource
|
|
378
|
+
|
|
379
|
+
return AsyncBenchmarkJobsResource(self)
|
|
380
|
+
|
|
381
|
+
@cached_property
|
|
382
|
+
def agents(self) -> AsyncAgentsResource:
|
|
383
|
+
from .resources.agents import AsyncAgentsResource
|
|
384
|
+
|
|
385
|
+
return AsyncAgentsResource(self)
|
|
386
|
+
|
|
387
|
+
@cached_property
|
|
388
|
+
def blueprints(self) -> AsyncBlueprintsResource:
|
|
389
|
+
from .resources.blueprints import AsyncBlueprintsResource
|
|
390
|
+
|
|
391
|
+
return AsyncBlueprintsResource(self)
|
|
392
|
+
|
|
393
|
+
@cached_property
|
|
394
|
+
def devboxes(self) -> AsyncDevboxesResource:
|
|
395
|
+
from .resources.devboxes import AsyncDevboxesResource
|
|
396
|
+
|
|
397
|
+
return AsyncDevboxesResource(self)
|
|
398
|
+
|
|
399
|
+
@cached_property
|
|
400
|
+
def scenarios(self) -> AsyncScenariosResource:
|
|
401
|
+
from .resources.scenarios import AsyncScenariosResource
|
|
402
|
+
|
|
403
|
+
return AsyncScenariosResource(self)
|
|
404
|
+
|
|
405
|
+
@cached_property
|
|
406
|
+
def objects(self) -> AsyncObjectsResource:
|
|
407
|
+
from .resources.objects import AsyncObjectsResource
|
|
408
|
+
|
|
409
|
+
return AsyncObjectsResource(self)
|
|
410
|
+
|
|
411
|
+
@cached_property
|
|
412
|
+
def repositories(self) -> AsyncRepositoriesResource:
|
|
413
|
+
from .resources.repositories import AsyncRepositoriesResource
|
|
414
|
+
|
|
415
|
+
return AsyncRepositoriesResource(self)
|
|
416
|
+
|
|
417
|
+
@cached_property
|
|
418
|
+
def secrets(self) -> AsyncSecretsResource:
|
|
419
|
+
from .resources.secrets import AsyncSecretsResource
|
|
420
|
+
|
|
421
|
+
return AsyncSecretsResource(self)
|
|
422
|
+
|
|
423
|
+
@cached_property
|
|
424
|
+
def network_policies(self) -> AsyncNetworkPoliciesResource:
|
|
425
|
+
from .resources.network_policies import AsyncNetworkPoliciesResource
|
|
426
|
+
|
|
427
|
+
return AsyncNetworkPoliciesResource(self)
|
|
428
|
+
|
|
429
|
+
@cached_property
|
|
430
|
+
def gateway_configs(self) -> AsyncGatewayConfigsResource:
|
|
431
|
+
from .resources.gateway_configs import AsyncGatewayConfigsResource
|
|
432
|
+
|
|
433
|
+
return AsyncGatewayConfigsResource(self)
|
|
434
|
+
|
|
435
|
+
@cached_property
|
|
436
|
+
def with_raw_response(self) -> AsyncRunloopWithRawResponse:
|
|
437
|
+
return AsyncRunloopWithRawResponse(self)
|
|
438
|
+
|
|
439
|
+
@cached_property
|
|
440
|
+
def with_streaming_response(self) -> AsyncRunloopWithStreamedResponse:
|
|
441
|
+
return AsyncRunloopWithStreamedResponse(self)
|
|
442
|
+
|
|
443
|
+
@property
|
|
444
|
+
@override
|
|
445
|
+
def qs(self) -> Querystring:
|
|
446
|
+
return Querystring(array_format="comma")
|
|
447
|
+
|
|
448
|
+
@property
|
|
449
|
+
@override
|
|
450
|
+
def auth_headers(self) -> dict[str, str]:
|
|
451
|
+
bearer_token = self.bearer_token
|
|
452
|
+
return {"Authorization": f"Bearer {bearer_token}"}
|
|
453
|
+
|
|
454
|
+
@property
|
|
455
|
+
@override
|
|
456
|
+
def default_headers(self) -> dict[str, str | Omit]:
|
|
457
|
+
return {
|
|
458
|
+
**super().default_headers,
|
|
459
|
+
"X-Stainless-Async": f"async:{get_async_library()}",
|
|
460
|
+
**self._custom_headers,
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
def copy(
|
|
464
|
+
self,
|
|
465
|
+
*,
|
|
466
|
+
bearer_token: str | None = None,
|
|
467
|
+
base_url: str | httpx.URL | None = None,
|
|
468
|
+
timeout: float | Timeout | None | NotGiven = not_given,
|
|
469
|
+
http_client: httpx.AsyncClient | None = None,
|
|
470
|
+
max_retries: int | NotGiven = not_given,
|
|
471
|
+
default_headers: Mapping[str, str] | None = None,
|
|
472
|
+
set_default_headers: Mapping[str, str] | None = None,
|
|
473
|
+
default_query: Mapping[str, object] | None = None,
|
|
474
|
+
set_default_query: Mapping[str, object] | None = None,
|
|
475
|
+
_extra_kwargs: Mapping[str, Any] = {},
|
|
476
|
+
) -> Self:
|
|
477
|
+
"""
|
|
478
|
+
Create a new client instance re-using the same options given to the current client with optional overriding.
|
|
479
|
+
"""
|
|
480
|
+
if default_headers is not None and set_default_headers is not None:
|
|
481
|
+
raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive")
|
|
482
|
+
|
|
483
|
+
if default_query is not None and set_default_query is not None:
|
|
484
|
+
raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive")
|
|
485
|
+
|
|
486
|
+
headers = self._custom_headers
|
|
487
|
+
if default_headers is not None:
|
|
488
|
+
headers = {**headers, **default_headers}
|
|
489
|
+
elif set_default_headers is not None:
|
|
490
|
+
headers = set_default_headers
|
|
491
|
+
|
|
492
|
+
params = self._custom_query
|
|
493
|
+
if default_query is not None:
|
|
494
|
+
params = {**params, **default_query}
|
|
495
|
+
elif set_default_query is not None:
|
|
496
|
+
params = set_default_query
|
|
497
|
+
|
|
498
|
+
http_client = http_client or self._client
|
|
499
|
+
return self.__class__(
|
|
500
|
+
bearer_token=bearer_token or self.bearer_token,
|
|
501
|
+
base_url=base_url or self.base_url,
|
|
502
|
+
timeout=self.timeout if isinstance(timeout, NotGiven) else timeout,
|
|
503
|
+
http_client=http_client,
|
|
504
|
+
max_retries=max_retries if is_given(max_retries) else self.max_retries,
|
|
505
|
+
default_headers=headers,
|
|
506
|
+
default_query=params,
|
|
507
|
+
**_extra_kwargs,
|
|
508
|
+
)
|
|
509
|
+
|
|
510
|
+
# Alias for `copy` for nicer inline usage, e.g.
|
|
511
|
+
# client.with_options(timeout=10).foo.create(...)
|
|
512
|
+
with_options = copy
|
|
513
|
+
|
|
514
|
+
@override
|
|
515
|
+
def _make_status_error(
|
|
516
|
+
self,
|
|
517
|
+
err_msg: str,
|
|
518
|
+
*,
|
|
519
|
+
body: object,
|
|
520
|
+
response: httpx.Response,
|
|
521
|
+
) -> APIStatusError:
|
|
522
|
+
if response.status_code == 400:
|
|
523
|
+
return _exceptions.BadRequestError(err_msg, response=response, body=body)
|
|
524
|
+
|
|
525
|
+
if response.status_code == 401:
|
|
526
|
+
return _exceptions.AuthenticationError(err_msg, response=response, body=body)
|
|
527
|
+
|
|
528
|
+
if response.status_code == 403:
|
|
529
|
+
return _exceptions.PermissionDeniedError(err_msg, response=response, body=body)
|
|
530
|
+
|
|
531
|
+
if response.status_code == 404:
|
|
532
|
+
return _exceptions.NotFoundError(err_msg, response=response, body=body)
|
|
533
|
+
|
|
534
|
+
if response.status_code == 409:
|
|
535
|
+
return _exceptions.ConflictError(err_msg, response=response, body=body)
|
|
536
|
+
|
|
537
|
+
if response.status_code == 422:
|
|
538
|
+
return _exceptions.UnprocessableEntityError(err_msg, response=response, body=body)
|
|
539
|
+
|
|
540
|
+
if response.status_code == 429:
|
|
541
|
+
return _exceptions.RateLimitError(err_msg, response=response, body=body)
|
|
542
|
+
|
|
543
|
+
if response.status_code >= 500:
|
|
544
|
+
return _exceptions.InternalServerError(err_msg, response=response, body=body)
|
|
545
|
+
return APIStatusError(err_msg, response=response, body=body)
|
|
546
|
+
|
|
547
|
+
|
|
548
|
+
class RunloopWithRawResponse:
|
|
549
|
+
_client: Runloop
|
|
550
|
+
|
|
551
|
+
def __init__(self, client: Runloop) -> None:
|
|
552
|
+
self._client = client
|
|
553
|
+
|
|
554
|
+
@cached_property
|
|
555
|
+
def benchmarks(self) -> benchmarks.BenchmarksResourceWithRawResponse:
|
|
556
|
+
from .resources.benchmarks import BenchmarksResourceWithRawResponse
|
|
557
|
+
|
|
558
|
+
return BenchmarksResourceWithRawResponse(self._client.benchmarks)
|
|
559
|
+
|
|
560
|
+
@cached_property
|
|
561
|
+
def benchmark_runs(self) -> benchmark_runs.BenchmarkRunsResourceWithRawResponse:
|
|
562
|
+
from .resources.benchmark_runs import BenchmarkRunsResourceWithRawResponse
|
|
563
|
+
|
|
564
|
+
return BenchmarkRunsResourceWithRawResponse(self._client.benchmark_runs)
|
|
565
|
+
|
|
566
|
+
@cached_property
|
|
567
|
+
def benchmark_jobs(self) -> benchmark_jobs.BenchmarkJobsResourceWithRawResponse:
|
|
568
|
+
from .resources.benchmark_jobs import BenchmarkJobsResourceWithRawResponse
|
|
569
|
+
|
|
570
|
+
return BenchmarkJobsResourceWithRawResponse(self._client.benchmark_jobs)
|
|
571
|
+
|
|
572
|
+
@cached_property
|
|
573
|
+
def agents(self) -> agents.AgentsResourceWithRawResponse:
|
|
574
|
+
from .resources.agents import AgentsResourceWithRawResponse
|
|
575
|
+
|
|
576
|
+
return AgentsResourceWithRawResponse(self._client.agents)
|
|
577
|
+
|
|
578
|
+
@cached_property
|
|
579
|
+
def blueprints(self) -> blueprints.BlueprintsResourceWithRawResponse:
|
|
580
|
+
from .resources.blueprints import BlueprintsResourceWithRawResponse
|
|
581
|
+
|
|
582
|
+
return BlueprintsResourceWithRawResponse(self._client.blueprints)
|
|
583
|
+
|
|
584
|
+
@cached_property
|
|
585
|
+
def devboxes(self) -> devboxes.DevboxesResourceWithRawResponse:
|
|
586
|
+
from .resources.devboxes import DevboxesResourceWithRawResponse
|
|
587
|
+
|
|
588
|
+
return DevboxesResourceWithRawResponse(self._client.devboxes)
|
|
589
|
+
|
|
590
|
+
@cached_property
|
|
591
|
+
def scenarios(self) -> scenarios.ScenariosResourceWithRawResponse:
|
|
592
|
+
from .resources.scenarios import ScenariosResourceWithRawResponse
|
|
593
|
+
|
|
594
|
+
return ScenariosResourceWithRawResponse(self._client.scenarios)
|
|
595
|
+
|
|
596
|
+
@cached_property
|
|
597
|
+
def objects(self) -> objects.ObjectsResourceWithRawResponse:
|
|
598
|
+
from .resources.objects import ObjectsResourceWithRawResponse
|
|
599
|
+
|
|
600
|
+
return ObjectsResourceWithRawResponse(self._client.objects)
|
|
601
|
+
|
|
602
|
+
@cached_property
|
|
603
|
+
def repositories(self) -> repositories.RepositoriesResourceWithRawResponse:
|
|
604
|
+
from .resources.repositories import RepositoriesResourceWithRawResponse
|
|
605
|
+
|
|
606
|
+
return RepositoriesResourceWithRawResponse(self._client.repositories)
|
|
607
|
+
|
|
608
|
+
@cached_property
|
|
609
|
+
def secrets(self) -> secrets.SecretsResourceWithRawResponse:
|
|
610
|
+
from .resources.secrets import SecretsResourceWithRawResponse
|
|
611
|
+
|
|
612
|
+
return SecretsResourceWithRawResponse(self._client.secrets)
|
|
613
|
+
|
|
614
|
+
@cached_property
|
|
615
|
+
def network_policies(self) -> network_policies.NetworkPoliciesResourceWithRawResponse:
|
|
616
|
+
from .resources.network_policies import NetworkPoliciesResourceWithRawResponse
|
|
617
|
+
|
|
618
|
+
return NetworkPoliciesResourceWithRawResponse(self._client.network_policies)
|
|
619
|
+
|
|
620
|
+
@cached_property
|
|
621
|
+
def gateway_configs(self) -> gateway_configs.GatewayConfigsResourceWithRawResponse:
|
|
622
|
+
from .resources.gateway_configs import GatewayConfigsResourceWithRawResponse
|
|
623
|
+
|
|
624
|
+
return GatewayConfigsResourceWithRawResponse(self._client.gateway_configs)
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
class AsyncRunloopWithRawResponse:
|
|
628
|
+
_client: AsyncRunloop
|
|
629
|
+
|
|
630
|
+
def __init__(self, client: AsyncRunloop) -> None:
|
|
631
|
+
self._client = client
|
|
632
|
+
|
|
633
|
+
@cached_property
|
|
634
|
+
def benchmarks(self) -> benchmarks.AsyncBenchmarksResourceWithRawResponse:
|
|
635
|
+
from .resources.benchmarks import AsyncBenchmarksResourceWithRawResponse
|
|
636
|
+
|
|
637
|
+
return AsyncBenchmarksResourceWithRawResponse(self._client.benchmarks)
|
|
638
|
+
|
|
639
|
+
@cached_property
|
|
640
|
+
def benchmark_runs(self) -> benchmark_runs.AsyncBenchmarkRunsResourceWithRawResponse:
|
|
641
|
+
from .resources.benchmark_runs import AsyncBenchmarkRunsResourceWithRawResponse
|
|
642
|
+
|
|
643
|
+
return AsyncBenchmarkRunsResourceWithRawResponse(self._client.benchmark_runs)
|
|
644
|
+
|
|
645
|
+
@cached_property
|
|
646
|
+
def benchmark_jobs(self) -> benchmark_jobs.AsyncBenchmarkJobsResourceWithRawResponse:
|
|
647
|
+
from .resources.benchmark_jobs import AsyncBenchmarkJobsResourceWithRawResponse
|
|
648
|
+
|
|
649
|
+
return AsyncBenchmarkJobsResourceWithRawResponse(self._client.benchmark_jobs)
|
|
650
|
+
|
|
651
|
+
@cached_property
|
|
652
|
+
def agents(self) -> agents.AsyncAgentsResourceWithRawResponse:
|
|
653
|
+
from .resources.agents import AsyncAgentsResourceWithRawResponse
|
|
654
|
+
|
|
655
|
+
return AsyncAgentsResourceWithRawResponse(self._client.agents)
|
|
656
|
+
|
|
657
|
+
@cached_property
|
|
658
|
+
def blueprints(self) -> blueprints.AsyncBlueprintsResourceWithRawResponse:
|
|
659
|
+
from .resources.blueprints import AsyncBlueprintsResourceWithRawResponse
|
|
660
|
+
|
|
661
|
+
return AsyncBlueprintsResourceWithRawResponse(self._client.blueprints)
|
|
662
|
+
|
|
663
|
+
@cached_property
|
|
664
|
+
def devboxes(self) -> devboxes.AsyncDevboxesResourceWithRawResponse:
|
|
665
|
+
from .resources.devboxes import AsyncDevboxesResourceWithRawResponse
|
|
666
|
+
|
|
667
|
+
return AsyncDevboxesResourceWithRawResponse(self._client.devboxes)
|
|
668
|
+
|
|
669
|
+
@cached_property
|
|
670
|
+
def scenarios(self) -> scenarios.AsyncScenariosResourceWithRawResponse:
|
|
671
|
+
from .resources.scenarios import AsyncScenariosResourceWithRawResponse
|
|
672
|
+
|
|
673
|
+
return AsyncScenariosResourceWithRawResponse(self._client.scenarios)
|
|
674
|
+
|
|
675
|
+
@cached_property
|
|
676
|
+
def objects(self) -> objects.AsyncObjectsResourceWithRawResponse:
|
|
677
|
+
from .resources.objects import AsyncObjectsResourceWithRawResponse
|
|
678
|
+
|
|
679
|
+
return AsyncObjectsResourceWithRawResponse(self._client.objects)
|
|
680
|
+
|
|
681
|
+
@cached_property
|
|
682
|
+
def repositories(self) -> repositories.AsyncRepositoriesResourceWithRawResponse:
|
|
683
|
+
from .resources.repositories import AsyncRepositoriesResourceWithRawResponse
|
|
684
|
+
|
|
685
|
+
return AsyncRepositoriesResourceWithRawResponse(self._client.repositories)
|
|
686
|
+
|
|
687
|
+
@cached_property
|
|
688
|
+
def secrets(self) -> secrets.AsyncSecretsResourceWithRawResponse:
|
|
689
|
+
from .resources.secrets import AsyncSecretsResourceWithRawResponse
|
|
690
|
+
|
|
691
|
+
return AsyncSecretsResourceWithRawResponse(self._client.secrets)
|
|
692
|
+
|
|
693
|
+
@cached_property
|
|
694
|
+
def network_policies(self) -> network_policies.AsyncNetworkPoliciesResourceWithRawResponse:
|
|
695
|
+
from .resources.network_policies import AsyncNetworkPoliciesResourceWithRawResponse
|
|
696
|
+
|
|
697
|
+
return AsyncNetworkPoliciesResourceWithRawResponse(self._client.network_policies)
|
|
698
|
+
|
|
699
|
+
@cached_property
|
|
700
|
+
def gateway_configs(self) -> gateway_configs.AsyncGatewayConfigsResourceWithRawResponse:
|
|
701
|
+
from .resources.gateway_configs import AsyncGatewayConfigsResourceWithRawResponse
|
|
702
|
+
|
|
703
|
+
return AsyncGatewayConfigsResourceWithRawResponse(self._client.gateway_configs)
|
|
704
|
+
|
|
705
|
+
|
|
706
|
+
class RunloopWithStreamedResponse:
|
|
707
|
+
_client: Runloop
|
|
708
|
+
|
|
709
|
+
def __init__(self, client: Runloop) -> None:
|
|
710
|
+
self._client = client
|
|
711
|
+
|
|
712
|
+
@cached_property
|
|
713
|
+
def benchmarks(self) -> benchmarks.BenchmarksResourceWithStreamingResponse:
|
|
714
|
+
from .resources.benchmarks import BenchmarksResourceWithStreamingResponse
|
|
715
|
+
|
|
716
|
+
return BenchmarksResourceWithStreamingResponse(self._client.benchmarks)
|
|
717
|
+
|
|
718
|
+
@cached_property
|
|
719
|
+
def benchmark_runs(self) -> benchmark_runs.BenchmarkRunsResourceWithStreamingResponse:
|
|
720
|
+
from .resources.benchmark_runs import BenchmarkRunsResourceWithStreamingResponse
|
|
721
|
+
|
|
722
|
+
return BenchmarkRunsResourceWithStreamingResponse(self._client.benchmark_runs)
|
|
723
|
+
|
|
724
|
+
@cached_property
|
|
725
|
+
def benchmark_jobs(self) -> benchmark_jobs.BenchmarkJobsResourceWithStreamingResponse:
|
|
726
|
+
from .resources.benchmark_jobs import BenchmarkJobsResourceWithStreamingResponse
|
|
727
|
+
|
|
728
|
+
return BenchmarkJobsResourceWithStreamingResponse(self._client.benchmark_jobs)
|
|
729
|
+
|
|
730
|
+
@cached_property
|
|
731
|
+
def agents(self) -> agents.AgentsResourceWithStreamingResponse:
|
|
732
|
+
from .resources.agents import AgentsResourceWithStreamingResponse
|
|
733
|
+
|
|
734
|
+
return AgentsResourceWithStreamingResponse(self._client.agents)
|
|
735
|
+
|
|
736
|
+
@cached_property
|
|
737
|
+
def blueprints(self) -> blueprints.BlueprintsResourceWithStreamingResponse:
|
|
738
|
+
from .resources.blueprints import BlueprintsResourceWithStreamingResponse
|
|
739
|
+
|
|
740
|
+
return BlueprintsResourceWithStreamingResponse(self._client.blueprints)
|
|
741
|
+
|
|
742
|
+
@cached_property
|
|
743
|
+
def devboxes(self) -> devboxes.DevboxesResourceWithStreamingResponse:
|
|
744
|
+
from .resources.devboxes import DevboxesResourceWithStreamingResponse
|
|
745
|
+
|
|
746
|
+
return DevboxesResourceWithStreamingResponse(self._client.devboxes)
|
|
747
|
+
|
|
748
|
+
@cached_property
|
|
749
|
+
def scenarios(self) -> scenarios.ScenariosResourceWithStreamingResponse:
|
|
750
|
+
from .resources.scenarios import ScenariosResourceWithStreamingResponse
|
|
751
|
+
|
|
752
|
+
return ScenariosResourceWithStreamingResponse(self._client.scenarios)
|
|
753
|
+
|
|
754
|
+
@cached_property
|
|
755
|
+
def objects(self) -> objects.ObjectsResourceWithStreamingResponse:
|
|
756
|
+
from .resources.objects import ObjectsResourceWithStreamingResponse
|
|
757
|
+
|
|
758
|
+
return ObjectsResourceWithStreamingResponse(self._client.objects)
|
|
759
|
+
|
|
760
|
+
@cached_property
|
|
761
|
+
def repositories(self) -> repositories.RepositoriesResourceWithStreamingResponse:
|
|
762
|
+
from .resources.repositories import RepositoriesResourceWithStreamingResponse
|
|
763
|
+
|
|
764
|
+
return RepositoriesResourceWithStreamingResponse(self._client.repositories)
|
|
765
|
+
|
|
766
|
+
@cached_property
|
|
767
|
+
def secrets(self) -> secrets.SecretsResourceWithStreamingResponse:
|
|
768
|
+
from .resources.secrets import SecretsResourceWithStreamingResponse
|
|
769
|
+
|
|
770
|
+
return SecretsResourceWithStreamingResponse(self._client.secrets)
|
|
771
|
+
|
|
772
|
+
@cached_property
|
|
773
|
+
def network_policies(self) -> network_policies.NetworkPoliciesResourceWithStreamingResponse:
|
|
774
|
+
from .resources.network_policies import NetworkPoliciesResourceWithStreamingResponse
|
|
775
|
+
|
|
776
|
+
return NetworkPoliciesResourceWithStreamingResponse(self._client.network_policies)
|
|
777
|
+
|
|
778
|
+
@cached_property
|
|
779
|
+
def gateway_configs(self) -> gateway_configs.GatewayConfigsResourceWithStreamingResponse:
|
|
780
|
+
from .resources.gateway_configs import GatewayConfigsResourceWithStreamingResponse
|
|
781
|
+
|
|
782
|
+
return GatewayConfigsResourceWithStreamingResponse(self._client.gateway_configs)
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
class AsyncRunloopWithStreamedResponse:
|
|
786
|
+
_client: AsyncRunloop
|
|
787
|
+
|
|
788
|
+
def __init__(self, client: AsyncRunloop) -> None:
|
|
789
|
+
self._client = client
|
|
790
|
+
|
|
791
|
+
@cached_property
|
|
792
|
+
def benchmarks(self) -> benchmarks.AsyncBenchmarksResourceWithStreamingResponse:
|
|
793
|
+
from .resources.benchmarks import AsyncBenchmarksResourceWithStreamingResponse
|
|
794
|
+
|
|
795
|
+
return AsyncBenchmarksResourceWithStreamingResponse(self._client.benchmarks)
|
|
796
|
+
|
|
797
|
+
@cached_property
|
|
798
|
+
def benchmark_runs(self) -> benchmark_runs.AsyncBenchmarkRunsResourceWithStreamingResponse:
|
|
799
|
+
from .resources.benchmark_runs import AsyncBenchmarkRunsResourceWithStreamingResponse
|
|
800
|
+
|
|
801
|
+
return AsyncBenchmarkRunsResourceWithStreamingResponse(self._client.benchmark_runs)
|
|
802
|
+
|
|
803
|
+
@cached_property
|
|
804
|
+
def benchmark_jobs(self) -> benchmark_jobs.AsyncBenchmarkJobsResourceWithStreamingResponse:
|
|
805
|
+
from .resources.benchmark_jobs import AsyncBenchmarkJobsResourceWithStreamingResponse
|
|
806
|
+
|
|
807
|
+
return AsyncBenchmarkJobsResourceWithStreamingResponse(self._client.benchmark_jobs)
|
|
808
|
+
|
|
809
|
+
@cached_property
|
|
810
|
+
def agents(self) -> agents.AsyncAgentsResourceWithStreamingResponse:
|
|
811
|
+
from .resources.agents import AsyncAgentsResourceWithStreamingResponse
|
|
812
|
+
|
|
813
|
+
return AsyncAgentsResourceWithStreamingResponse(self._client.agents)
|
|
814
|
+
|
|
815
|
+
@cached_property
|
|
816
|
+
def blueprints(self) -> blueprints.AsyncBlueprintsResourceWithStreamingResponse:
|
|
817
|
+
from .resources.blueprints import AsyncBlueprintsResourceWithStreamingResponse
|
|
818
|
+
|
|
819
|
+
return AsyncBlueprintsResourceWithStreamingResponse(self._client.blueprints)
|
|
820
|
+
|
|
821
|
+
@cached_property
|
|
822
|
+
def devboxes(self) -> devboxes.AsyncDevboxesResourceWithStreamingResponse:
|
|
823
|
+
from .resources.devboxes import AsyncDevboxesResourceWithStreamingResponse
|
|
824
|
+
|
|
825
|
+
return AsyncDevboxesResourceWithStreamingResponse(self._client.devboxes)
|
|
826
|
+
|
|
827
|
+
@cached_property
|
|
828
|
+
def scenarios(self) -> scenarios.AsyncScenariosResourceWithStreamingResponse:
|
|
829
|
+
from .resources.scenarios import AsyncScenariosResourceWithStreamingResponse
|
|
830
|
+
|
|
831
|
+
return AsyncScenariosResourceWithStreamingResponse(self._client.scenarios)
|
|
832
|
+
|
|
833
|
+
@cached_property
|
|
834
|
+
def objects(self) -> objects.AsyncObjectsResourceWithStreamingResponse:
|
|
835
|
+
from .resources.objects import AsyncObjectsResourceWithStreamingResponse
|
|
836
|
+
|
|
837
|
+
return AsyncObjectsResourceWithStreamingResponse(self._client.objects)
|
|
838
|
+
|
|
839
|
+
@cached_property
|
|
840
|
+
def repositories(self) -> repositories.AsyncRepositoriesResourceWithStreamingResponse:
|
|
841
|
+
from .resources.repositories import AsyncRepositoriesResourceWithStreamingResponse
|
|
842
|
+
|
|
843
|
+
return AsyncRepositoriesResourceWithStreamingResponse(self._client.repositories)
|
|
844
|
+
|
|
845
|
+
@cached_property
|
|
846
|
+
def secrets(self) -> secrets.AsyncSecretsResourceWithStreamingResponse:
|
|
847
|
+
from .resources.secrets import AsyncSecretsResourceWithStreamingResponse
|
|
848
|
+
|
|
849
|
+
return AsyncSecretsResourceWithStreamingResponse(self._client.secrets)
|
|
850
|
+
|
|
851
|
+
@cached_property
|
|
852
|
+
def network_policies(self) -> network_policies.AsyncNetworkPoliciesResourceWithStreamingResponse:
|
|
853
|
+
from .resources.network_policies import AsyncNetworkPoliciesResourceWithStreamingResponse
|
|
854
|
+
|
|
855
|
+
return AsyncNetworkPoliciesResourceWithStreamingResponse(self._client.network_policies)
|
|
856
|
+
|
|
857
|
+
@cached_property
|
|
858
|
+
def gateway_configs(self) -> gateway_configs.AsyncGatewayConfigsResourceWithStreamingResponse:
|
|
859
|
+
from .resources.gateway_configs import AsyncGatewayConfigsResourceWithStreamingResponse
|
|
860
|
+
|
|
861
|
+
return AsyncGatewayConfigsResourceWithStreamingResponse(self._client.gateway_configs)
|
|
862
|
+
|
|
863
|
+
|
|
864
|
+
Client = Runloop
|
|
865
|
+
|
|
866
|
+
AsyncClient = AsyncRunloop
|