casedev 0.1.0__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.
- casedev/__init__.py +104 -0
- casedev/_base_client.py +1995 -0
- casedev/_client.py +560 -0
- casedev/_compat.py +219 -0
- casedev/_constants.py +14 -0
- casedev/_exceptions.py +108 -0
- casedev/_files.py +123 -0
- casedev/_models.py +857 -0
- casedev/_qs.py +150 -0
- casedev/_resource.py +43 -0
- casedev/_response.py +830 -0
- casedev/_streaming.py +333 -0
- casedev/_types.py +260 -0
- casedev/_utils/__init__.py +64 -0
- casedev/_utils/_compat.py +45 -0
- casedev/_utils/_datetime_parse.py +136 -0
- casedev/_utils/_logs.py +25 -0
- casedev/_utils/_proxy.py +65 -0
- casedev/_utils/_reflection.py +42 -0
- casedev/_utils/_resources_proxy.py +24 -0
- casedev/_utils/_streams.py +12 -0
- casedev/_utils/_sync.py +58 -0
- casedev/_utils/_transform.py +457 -0
- casedev/_utils/_typing.py +156 -0
- casedev/_utils/_utils.py +421 -0
- casedev/_version.py +4 -0
- casedev/lib/.keep +4 -0
- casedev/py.typed +0 -0
- casedev/resources/__init__.py +173 -0
- casedev/resources/actions/__init__.py +33 -0
- casedev/resources/actions/actions.py +102 -0
- casedev/resources/actions/v1.py +640 -0
- casedev/resources/compute/__init__.py +33 -0
- casedev/resources/compute/compute.py +102 -0
- casedev/resources/compute/v1/__init__.py +89 -0
- casedev/resources/compute/v1/environments.py +492 -0
- casedev/resources/compute/v1/functions.py +278 -0
- casedev/resources/compute/v1/invoke.py +216 -0
- casedev/resources/compute/v1/runs.py +290 -0
- casedev/resources/compute/v1/secrets.py +655 -0
- casedev/resources/compute/v1/v1.py +583 -0
- casedev/resources/convert/__init__.py +33 -0
- casedev/resources/convert/convert.py +102 -0
- casedev/resources/convert/v1/__init__.py +33 -0
- casedev/resources/convert/v1/jobs.py +254 -0
- casedev/resources/convert/v1/v1.py +450 -0
- casedev/resources/format/__init__.py +33 -0
- casedev/resources/format/format.py +102 -0
- casedev/resources/format/v1/__init__.py +33 -0
- casedev/resources/format/v1/templates.py +419 -0
- casedev/resources/format/v1/v1.py +244 -0
- casedev/resources/llm/__init__.py +33 -0
- casedev/resources/llm/llm.py +192 -0
- casedev/resources/llm/v1/__init__.py +33 -0
- casedev/resources/llm/v1/chat.py +243 -0
- casedev/resources/llm/v1/v1.py +317 -0
- casedev/resources/ocr/__init__.py +33 -0
- casedev/resources/ocr/ocr.py +102 -0
- casedev/resources/ocr/v1.py +407 -0
- casedev/resources/search/__init__.py +33 -0
- casedev/resources/search/search.py +102 -0
- casedev/resources/search/v1.py +1052 -0
- casedev/resources/templates/__init__.py +33 -0
- casedev/resources/templates/templates.py +102 -0
- casedev/resources/templates/v1.py +633 -0
- casedev/resources/vault/__init__.py +47 -0
- casedev/resources/vault/graphrag.py +256 -0
- casedev/resources/vault/objects.py +571 -0
- casedev/resources/vault/vault.py +764 -0
- casedev/resources/voice/__init__.py +61 -0
- casedev/resources/voice/streaming.py +160 -0
- casedev/resources/voice/transcription.py +327 -0
- casedev/resources/voice/v1/__init__.py +33 -0
- casedev/resources/voice/v1/speak.py +478 -0
- casedev/resources/voice/v1/v1.py +290 -0
- casedev/resources/voice/voice.py +166 -0
- casedev/resources/webhooks/__init__.py +33 -0
- casedev/resources/webhooks/v1.py +447 -0
- casedev/resources/webhooks/webhooks.py +102 -0
- casedev/resources/workflows/__init__.py +33 -0
- casedev/resources/workflows/v1.py +1053 -0
- casedev/resources/workflows/workflows.py +102 -0
- casedev/types/__init__.py +12 -0
- casedev/types/actions/__init__.py +8 -0
- casedev/types/actions/v1_create_params.py +22 -0
- casedev/types/actions/v1_create_response.py +33 -0
- casedev/types/actions/v1_execute_params.py +16 -0
- casedev/types/actions/v1_execute_response.py +31 -0
- casedev/types/compute/__init__.py +7 -0
- casedev/types/compute/v1/__init__.py +18 -0
- casedev/types/compute/v1/environment_create_params.py +12 -0
- casedev/types/compute/v1/environment_create_response.py +34 -0
- casedev/types/compute/v1/environment_delete_response.py +11 -0
- casedev/types/compute/v1/function_get_logs_params.py +12 -0
- casedev/types/compute/v1/function_list_params.py +12 -0
- casedev/types/compute/v1/invoke_run_params.py +21 -0
- casedev/types/compute/v1/invoke_run_response.py +39 -0
- casedev/types/compute/v1/run_list_params.py +18 -0
- casedev/types/compute/v1/secret_create_params.py +24 -0
- casedev/types/compute/v1/secret_create_response.py +24 -0
- casedev/types/compute/v1/secret_delete_group_params.py +18 -0
- casedev/types/compute/v1/secret_list_params.py +15 -0
- casedev/types/compute/v1/secret_retrieve_group_params.py +12 -0
- casedev/types/compute/v1/secret_update_group_params.py +16 -0
- casedev/types/compute/v1_deploy_params.py +114 -0
- casedev/types/compute/v1_deploy_response.py +30 -0
- casedev/types/compute/v1_get_usage_params.py +15 -0
- casedev/types/convert/__init__.py +8 -0
- casedev/types/convert/v1/__init__.py +3 -0
- casedev/types/convert/v1_process_params.py +15 -0
- casedev/types/convert/v1_process_response.py +19 -0
- casedev/types/convert/v1_webhook_params.py +32 -0
- casedev/types/convert/v1_webhook_response.py +13 -0
- casedev/types/format/__init__.py +5 -0
- casedev/types/format/v1/__init__.py +7 -0
- casedev/types/format/v1/template_create_params.py +32 -0
- casedev/types/format/v1/template_create_response.py +27 -0
- casedev/types/format/v1/template_list_params.py +12 -0
- casedev/types/format/v1_create_document_params.py +42 -0
- casedev/types/llm/__init__.py +5 -0
- casedev/types/llm/v1/__init__.py +6 -0
- casedev/types/llm/v1/chat_create_completion_params.py +42 -0
- casedev/types/llm/v1/chat_create_completion_response.py +49 -0
- casedev/types/llm/v1_create_embedding_params.py +27 -0
- casedev/types/ocr/__init__.py +6 -0
- casedev/types/ocr/v1_process_params.py +44 -0
- casedev/types/ocr/v1_process_response.py +32 -0
- casedev/types/search/__init__.py +15 -0
- casedev/types/search/v1_answer_params.py +45 -0
- casedev/types/search/v1_answer_response.py +35 -0
- casedev/types/search/v1_contents_params.py +42 -0
- casedev/types/search/v1_contents_response.py +31 -0
- casedev/types/search/v1_research_params.py +23 -0
- casedev/types/search/v1_research_response.py +20 -0
- casedev/types/search/v1_retrieve_research_params.py +15 -0
- casedev/types/search/v1_search_params.py +56 -0
- casedev/types/search/v1_search_response.py +38 -0
- casedev/types/search/v1_similar_params.py +44 -0
- casedev/types/search/v1_similar_response.py +33 -0
- casedev/types/templates/__init__.py +8 -0
- casedev/types/templates/v1_execute_params.py +22 -0
- casedev/types/templates/v1_execute_response.py +31 -0
- casedev/types/templates/v1_list_params.py +32 -0
- casedev/types/templates/v1_search_params.py +18 -0
- casedev/types/vault/__init__.py +6 -0
- casedev/types/vault/object_create_presigned_url_params.py +22 -0
- casedev/types/vault/object_create_presigned_url_response.py +51 -0
- casedev/types/vault_create_params.py +20 -0
- casedev/types/vault_create_response.py +36 -0
- casedev/types/vault_ingest_response.py +26 -0
- casedev/types/vault_list_response.py +40 -0
- casedev/types/vault_search_params.py +27 -0
- casedev/types/vault_search_response.py +53 -0
- casedev/types/vault_upload_params.py +26 -0
- casedev/types/vault_upload_response.py +39 -0
- casedev/types/voice/__init__.py +7 -0
- casedev/types/voice/transcription_create_params.py +36 -0
- casedev/types/voice/transcription_retrieve_response.py +41 -0
- casedev/types/voice/v1/__init__.py +6 -0
- casedev/types/voice/v1/speak_create_params.py +59 -0
- casedev/types/voice/v1/speak_stream_params.py +58 -0
- casedev/types/voice/v1_list_voices_params.py +36 -0
- casedev/types/webhooks/__init__.py +6 -0
- casedev/types/webhooks/v1_create_params.py +20 -0
- casedev/types/webhooks/v1_create_response.py +33 -0
- casedev/types/workflows/__init__.py +19 -0
- casedev/types/workflows/v1_create_params.py +32 -0
- casedev/types/workflows/v1_create_response.py +29 -0
- casedev/types/workflows/v1_delete_response.py +13 -0
- casedev/types/workflows/v1_deploy_response.py +20 -0
- casedev/types/workflows/v1_execute_params.py +12 -0
- casedev/types/workflows/v1_execute_response.py +22 -0
- casedev/types/workflows/v1_list_executions_params.py +13 -0
- casedev/types/workflows/v1_list_executions_response.py +27 -0
- casedev/types/workflows/v1_list_params.py +18 -0
- casedev/types/workflows/v1_list_response.py +37 -0
- casedev/types/workflows/v1_retrieve_execution_response.py +31 -0
- casedev/types/workflows/v1_retrieve_response.py +35 -0
- casedev/types/workflows/v1_undeploy_response.py +13 -0
- casedev/types/workflows/v1_update_params.py +26 -0
- casedev/types/workflows/v1_update_response.py +17 -0
- casedev-0.1.0.dist-info/METADATA +454 -0
- casedev-0.1.0.dist-info/RECORD +185 -0
- casedev-0.1.0.dist-info/WHEEL +4 -0
- casedev-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from .v1.v1 import (
|
|
6
|
+
V1Resource,
|
|
7
|
+
AsyncV1Resource,
|
|
8
|
+
V1ResourceWithRawResponse,
|
|
9
|
+
AsyncV1ResourceWithRawResponse,
|
|
10
|
+
V1ResourceWithStreamingResponse,
|
|
11
|
+
AsyncV1ResourceWithStreamingResponse,
|
|
12
|
+
)
|
|
13
|
+
from ..._compat import cached_property
|
|
14
|
+
from ..._resource import SyncAPIResource, AsyncAPIResource
|
|
15
|
+
|
|
16
|
+
__all__ = ["ComputeResource", "AsyncComputeResource"]
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class ComputeResource(SyncAPIResource):
|
|
20
|
+
@cached_property
|
|
21
|
+
def v1(self) -> V1Resource:
|
|
22
|
+
return V1Resource(self._client)
|
|
23
|
+
|
|
24
|
+
@cached_property
|
|
25
|
+
def with_raw_response(self) -> ComputeResourceWithRawResponse:
|
|
26
|
+
"""
|
|
27
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
28
|
+
the raw response object instead of the parsed content.
|
|
29
|
+
|
|
30
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
31
|
+
"""
|
|
32
|
+
return ComputeResourceWithRawResponse(self)
|
|
33
|
+
|
|
34
|
+
@cached_property
|
|
35
|
+
def with_streaming_response(self) -> ComputeResourceWithStreamingResponse:
|
|
36
|
+
"""
|
|
37
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
38
|
+
|
|
39
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
40
|
+
"""
|
|
41
|
+
return ComputeResourceWithStreamingResponse(self)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class AsyncComputeResource(AsyncAPIResource):
|
|
45
|
+
@cached_property
|
|
46
|
+
def v1(self) -> AsyncV1Resource:
|
|
47
|
+
return AsyncV1Resource(self._client)
|
|
48
|
+
|
|
49
|
+
@cached_property
|
|
50
|
+
def with_raw_response(self) -> AsyncComputeResourceWithRawResponse:
|
|
51
|
+
"""
|
|
52
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
53
|
+
the raw response object instead of the parsed content.
|
|
54
|
+
|
|
55
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
56
|
+
"""
|
|
57
|
+
return AsyncComputeResourceWithRawResponse(self)
|
|
58
|
+
|
|
59
|
+
@cached_property
|
|
60
|
+
def with_streaming_response(self) -> AsyncComputeResourceWithStreamingResponse:
|
|
61
|
+
"""
|
|
62
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
63
|
+
|
|
64
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
65
|
+
"""
|
|
66
|
+
return AsyncComputeResourceWithStreamingResponse(self)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class ComputeResourceWithRawResponse:
|
|
70
|
+
def __init__(self, compute: ComputeResource) -> None:
|
|
71
|
+
self._compute = compute
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def v1(self) -> V1ResourceWithRawResponse:
|
|
75
|
+
return V1ResourceWithRawResponse(self._compute.v1)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class AsyncComputeResourceWithRawResponse:
|
|
79
|
+
def __init__(self, compute: AsyncComputeResource) -> None:
|
|
80
|
+
self._compute = compute
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def v1(self) -> AsyncV1ResourceWithRawResponse:
|
|
84
|
+
return AsyncV1ResourceWithRawResponse(self._compute.v1)
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
class ComputeResourceWithStreamingResponse:
|
|
88
|
+
def __init__(self, compute: ComputeResource) -> None:
|
|
89
|
+
self._compute = compute
|
|
90
|
+
|
|
91
|
+
@cached_property
|
|
92
|
+
def v1(self) -> V1ResourceWithStreamingResponse:
|
|
93
|
+
return V1ResourceWithStreamingResponse(self._compute.v1)
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class AsyncComputeResourceWithStreamingResponse:
|
|
97
|
+
def __init__(self, compute: AsyncComputeResource) -> None:
|
|
98
|
+
self._compute = compute
|
|
99
|
+
|
|
100
|
+
@cached_property
|
|
101
|
+
def v1(self) -> AsyncV1ResourceWithStreamingResponse:
|
|
102
|
+
return AsyncV1ResourceWithStreamingResponse(self._compute.v1)
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from .v1 import (
|
|
4
|
+
V1Resource,
|
|
5
|
+
AsyncV1Resource,
|
|
6
|
+
V1ResourceWithRawResponse,
|
|
7
|
+
AsyncV1ResourceWithRawResponse,
|
|
8
|
+
V1ResourceWithStreamingResponse,
|
|
9
|
+
AsyncV1ResourceWithStreamingResponse,
|
|
10
|
+
)
|
|
11
|
+
from .runs import (
|
|
12
|
+
RunsResource,
|
|
13
|
+
AsyncRunsResource,
|
|
14
|
+
RunsResourceWithRawResponse,
|
|
15
|
+
AsyncRunsResourceWithRawResponse,
|
|
16
|
+
RunsResourceWithStreamingResponse,
|
|
17
|
+
AsyncRunsResourceWithStreamingResponse,
|
|
18
|
+
)
|
|
19
|
+
from .invoke import (
|
|
20
|
+
InvokeResource,
|
|
21
|
+
AsyncInvokeResource,
|
|
22
|
+
InvokeResourceWithRawResponse,
|
|
23
|
+
AsyncInvokeResourceWithRawResponse,
|
|
24
|
+
InvokeResourceWithStreamingResponse,
|
|
25
|
+
AsyncInvokeResourceWithStreamingResponse,
|
|
26
|
+
)
|
|
27
|
+
from .secrets import (
|
|
28
|
+
SecretsResource,
|
|
29
|
+
AsyncSecretsResource,
|
|
30
|
+
SecretsResourceWithRawResponse,
|
|
31
|
+
AsyncSecretsResourceWithRawResponse,
|
|
32
|
+
SecretsResourceWithStreamingResponse,
|
|
33
|
+
AsyncSecretsResourceWithStreamingResponse,
|
|
34
|
+
)
|
|
35
|
+
from .functions import (
|
|
36
|
+
FunctionsResource,
|
|
37
|
+
AsyncFunctionsResource,
|
|
38
|
+
FunctionsResourceWithRawResponse,
|
|
39
|
+
AsyncFunctionsResourceWithRawResponse,
|
|
40
|
+
FunctionsResourceWithStreamingResponse,
|
|
41
|
+
AsyncFunctionsResourceWithStreamingResponse,
|
|
42
|
+
)
|
|
43
|
+
from .environments import (
|
|
44
|
+
EnvironmentsResource,
|
|
45
|
+
AsyncEnvironmentsResource,
|
|
46
|
+
EnvironmentsResourceWithRawResponse,
|
|
47
|
+
AsyncEnvironmentsResourceWithRawResponse,
|
|
48
|
+
EnvironmentsResourceWithStreamingResponse,
|
|
49
|
+
AsyncEnvironmentsResourceWithStreamingResponse,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
__all__ = [
|
|
53
|
+
"EnvironmentsResource",
|
|
54
|
+
"AsyncEnvironmentsResource",
|
|
55
|
+
"EnvironmentsResourceWithRawResponse",
|
|
56
|
+
"AsyncEnvironmentsResourceWithRawResponse",
|
|
57
|
+
"EnvironmentsResourceWithStreamingResponse",
|
|
58
|
+
"AsyncEnvironmentsResourceWithStreamingResponse",
|
|
59
|
+
"FunctionsResource",
|
|
60
|
+
"AsyncFunctionsResource",
|
|
61
|
+
"FunctionsResourceWithRawResponse",
|
|
62
|
+
"AsyncFunctionsResourceWithRawResponse",
|
|
63
|
+
"FunctionsResourceWithStreamingResponse",
|
|
64
|
+
"AsyncFunctionsResourceWithStreamingResponse",
|
|
65
|
+
"InvokeResource",
|
|
66
|
+
"AsyncInvokeResource",
|
|
67
|
+
"InvokeResourceWithRawResponse",
|
|
68
|
+
"AsyncInvokeResourceWithRawResponse",
|
|
69
|
+
"InvokeResourceWithStreamingResponse",
|
|
70
|
+
"AsyncInvokeResourceWithStreamingResponse",
|
|
71
|
+
"RunsResource",
|
|
72
|
+
"AsyncRunsResource",
|
|
73
|
+
"RunsResourceWithRawResponse",
|
|
74
|
+
"AsyncRunsResourceWithRawResponse",
|
|
75
|
+
"RunsResourceWithStreamingResponse",
|
|
76
|
+
"AsyncRunsResourceWithStreamingResponse",
|
|
77
|
+
"SecretsResource",
|
|
78
|
+
"AsyncSecretsResource",
|
|
79
|
+
"SecretsResourceWithRawResponse",
|
|
80
|
+
"AsyncSecretsResourceWithRawResponse",
|
|
81
|
+
"SecretsResourceWithStreamingResponse",
|
|
82
|
+
"AsyncSecretsResourceWithStreamingResponse",
|
|
83
|
+
"V1Resource",
|
|
84
|
+
"AsyncV1Resource",
|
|
85
|
+
"V1ResourceWithRawResponse",
|
|
86
|
+
"AsyncV1ResourceWithRawResponse",
|
|
87
|
+
"V1ResourceWithStreamingResponse",
|
|
88
|
+
"AsyncV1ResourceWithStreamingResponse",
|
|
89
|
+
]
|
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ...._types import Body, Query, Headers, NoneType, NotGiven, not_given
|
|
8
|
+
from ...._utils import maybe_transform, async_maybe_transform
|
|
9
|
+
from ...._compat import cached_property
|
|
10
|
+
from ...._resource import SyncAPIResource, AsyncAPIResource
|
|
11
|
+
from ...._response import (
|
|
12
|
+
to_raw_response_wrapper,
|
|
13
|
+
to_streamed_response_wrapper,
|
|
14
|
+
async_to_raw_response_wrapper,
|
|
15
|
+
async_to_streamed_response_wrapper,
|
|
16
|
+
)
|
|
17
|
+
from ...._base_client import make_request_options
|
|
18
|
+
from ....types.compute.v1 import environment_create_params
|
|
19
|
+
from ....types.compute.v1.environment_create_response import EnvironmentCreateResponse
|
|
20
|
+
from ....types.compute.v1.environment_delete_response import EnvironmentDeleteResponse
|
|
21
|
+
|
|
22
|
+
__all__ = ["EnvironmentsResource", "AsyncEnvironmentsResource"]
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class EnvironmentsResource(SyncAPIResource):
|
|
26
|
+
@cached_property
|
|
27
|
+
def with_raw_response(self) -> EnvironmentsResourceWithRawResponse:
|
|
28
|
+
"""
|
|
29
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
30
|
+
the raw response object instead of the parsed content.
|
|
31
|
+
|
|
32
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
33
|
+
"""
|
|
34
|
+
return EnvironmentsResourceWithRawResponse(self)
|
|
35
|
+
|
|
36
|
+
@cached_property
|
|
37
|
+
def with_streaming_response(self) -> EnvironmentsResourceWithStreamingResponse:
|
|
38
|
+
"""
|
|
39
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
40
|
+
|
|
41
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
42
|
+
"""
|
|
43
|
+
return EnvironmentsResourceWithStreamingResponse(self)
|
|
44
|
+
|
|
45
|
+
def create(
|
|
46
|
+
self,
|
|
47
|
+
*,
|
|
48
|
+
name: str,
|
|
49
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
50
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
51
|
+
extra_headers: Headers | None = None,
|
|
52
|
+
extra_query: Query | None = None,
|
|
53
|
+
extra_body: Body | None = None,
|
|
54
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
55
|
+
) -> EnvironmentCreateResponse:
|
|
56
|
+
"""Creates a new compute environment for running serverless workloads.
|
|
57
|
+
|
|
58
|
+
Each
|
|
59
|
+
environment gets its own isolated namespace with a unique domain for hosting
|
|
60
|
+
applications and APIs. The first environment created becomes the default
|
|
61
|
+
environment for the organization.
|
|
62
|
+
|
|
63
|
+
Args:
|
|
64
|
+
name: Environment name (alphanumeric, hyphens, and underscores only)
|
|
65
|
+
|
|
66
|
+
extra_headers: Send extra headers
|
|
67
|
+
|
|
68
|
+
extra_query: Add additional query parameters to the request
|
|
69
|
+
|
|
70
|
+
extra_body: Add additional JSON properties to the request
|
|
71
|
+
|
|
72
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
73
|
+
"""
|
|
74
|
+
return self._post(
|
|
75
|
+
"/compute/v1/environments",
|
|
76
|
+
body=maybe_transform({"name": name}, environment_create_params.EnvironmentCreateParams),
|
|
77
|
+
options=make_request_options(
|
|
78
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
79
|
+
),
|
|
80
|
+
cast_to=EnvironmentCreateResponse,
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
def retrieve(
|
|
84
|
+
self,
|
|
85
|
+
name: str,
|
|
86
|
+
*,
|
|
87
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
88
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
89
|
+
extra_headers: Headers | None = None,
|
|
90
|
+
extra_query: Query | None = None,
|
|
91
|
+
extra_body: Body | None = None,
|
|
92
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
93
|
+
) -> None:
|
|
94
|
+
"""Retrieve a specific compute environment by name.
|
|
95
|
+
|
|
96
|
+
Returns environment
|
|
97
|
+
configuration including status, domain, and metadata for your serverless compute
|
|
98
|
+
infrastructure.
|
|
99
|
+
|
|
100
|
+
Args:
|
|
101
|
+
extra_headers: Send extra headers
|
|
102
|
+
|
|
103
|
+
extra_query: Add additional query parameters to the request
|
|
104
|
+
|
|
105
|
+
extra_body: Add additional JSON properties to the request
|
|
106
|
+
|
|
107
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
108
|
+
"""
|
|
109
|
+
if not name:
|
|
110
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
111
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
112
|
+
return self._get(
|
|
113
|
+
f"/compute/v1/environments/{name}",
|
|
114
|
+
options=make_request_options(
|
|
115
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
116
|
+
),
|
|
117
|
+
cast_to=NoneType,
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
def list(
|
|
121
|
+
self,
|
|
122
|
+
*,
|
|
123
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
124
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
125
|
+
extra_headers: Headers | None = None,
|
|
126
|
+
extra_query: Query | None = None,
|
|
127
|
+
extra_body: Body | None = None,
|
|
128
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
129
|
+
) -> None:
|
|
130
|
+
"""Retrieve all compute environments for your organization.
|
|
131
|
+
|
|
132
|
+
Environments provide
|
|
133
|
+
isolated execution contexts for running code and workflows.
|
|
134
|
+
"""
|
|
135
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
136
|
+
return self._get(
|
|
137
|
+
"/compute/v1/environments",
|
|
138
|
+
options=make_request_options(
|
|
139
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
140
|
+
),
|
|
141
|
+
cast_to=NoneType,
|
|
142
|
+
)
|
|
143
|
+
|
|
144
|
+
def delete(
|
|
145
|
+
self,
|
|
146
|
+
name: str,
|
|
147
|
+
*,
|
|
148
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
149
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
150
|
+
extra_headers: Headers | None = None,
|
|
151
|
+
extra_query: Query | None = None,
|
|
152
|
+
extra_body: Body | None = None,
|
|
153
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
154
|
+
) -> EnvironmentDeleteResponse:
|
|
155
|
+
"""Permanently delete a compute environment and all its associated resources.
|
|
156
|
+
|
|
157
|
+
This
|
|
158
|
+
will stop all running deployments and clean up related configurations. The
|
|
159
|
+
default environment cannot be deleted if other environments exist.
|
|
160
|
+
|
|
161
|
+
Args:
|
|
162
|
+
extra_headers: Send extra headers
|
|
163
|
+
|
|
164
|
+
extra_query: Add additional query parameters to the request
|
|
165
|
+
|
|
166
|
+
extra_body: Add additional JSON properties to the request
|
|
167
|
+
|
|
168
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
169
|
+
"""
|
|
170
|
+
if not name:
|
|
171
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
172
|
+
return self._delete(
|
|
173
|
+
f"/compute/v1/environments/{name}",
|
|
174
|
+
options=make_request_options(
|
|
175
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
176
|
+
),
|
|
177
|
+
cast_to=EnvironmentDeleteResponse,
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
def set_default(
|
|
181
|
+
self,
|
|
182
|
+
name: str,
|
|
183
|
+
*,
|
|
184
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
185
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
186
|
+
extra_headers: Headers | None = None,
|
|
187
|
+
extra_query: Query | None = None,
|
|
188
|
+
extra_body: Body | None = None,
|
|
189
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
190
|
+
) -> None:
|
|
191
|
+
"""Sets a compute environment as the default for the organization.
|
|
192
|
+
|
|
193
|
+
Only one
|
|
194
|
+
environment can be default at a time - setting a new default will automatically
|
|
195
|
+
unset the previous one.
|
|
196
|
+
|
|
197
|
+
Args:
|
|
198
|
+
extra_headers: Send extra headers
|
|
199
|
+
|
|
200
|
+
extra_query: Add additional query parameters to the request
|
|
201
|
+
|
|
202
|
+
extra_body: Add additional JSON properties to the request
|
|
203
|
+
|
|
204
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
205
|
+
"""
|
|
206
|
+
if not name:
|
|
207
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
208
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
209
|
+
return self._post(
|
|
210
|
+
f"/compute/v1/environments/{name}/default",
|
|
211
|
+
options=make_request_options(
|
|
212
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
213
|
+
),
|
|
214
|
+
cast_to=NoneType,
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
class AsyncEnvironmentsResource(AsyncAPIResource):
|
|
219
|
+
@cached_property
|
|
220
|
+
def with_raw_response(self) -> AsyncEnvironmentsResourceWithRawResponse:
|
|
221
|
+
"""
|
|
222
|
+
This property can be used as a prefix for any HTTP method call to return
|
|
223
|
+
the raw response object instead of the parsed content.
|
|
224
|
+
|
|
225
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#accessing-raw-response-data-eg-headers
|
|
226
|
+
"""
|
|
227
|
+
return AsyncEnvironmentsResourceWithRawResponse(self)
|
|
228
|
+
|
|
229
|
+
@cached_property
|
|
230
|
+
def with_streaming_response(self) -> AsyncEnvironmentsResourceWithStreamingResponse:
|
|
231
|
+
"""
|
|
232
|
+
An alternative to `.with_raw_response` that doesn't eagerly read the response body.
|
|
233
|
+
|
|
234
|
+
For more information, see https://www.github.com/CaseMark/casedev-python#with_streaming_response
|
|
235
|
+
"""
|
|
236
|
+
return AsyncEnvironmentsResourceWithStreamingResponse(self)
|
|
237
|
+
|
|
238
|
+
async def create(
|
|
239
|
+
self,
|
|
240
|
+
*,
|
|
241
|
+
name: str,
|
|
242
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
243
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
244
|
+
extra_headers: Headers | None = None,
|
|
245
|
+
extra_query: Query | None = None,
|
|
246
|
+
extra_body: Body | None = None,
|
|
247
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
248
|
+
) -> EnvironmentCreateResponse:
|
|
249
|
+
"""Creates a new compute environment for running serverless workloads.
|
|
250
|
+
|
|
251
|
+
Each
|
|
252
|
+
environment gets its own isolated namespace with a unique domain for hosting
|
|
253
|
+
applications and APIs. The first environment created becomes the default
|
|
254
|
+
environment for the organization.
|
|
255
|
+
|
|
256
|
+
Args:
|
|
257
|
+
name: Environment name (alphanumeric, hyphens, and underscores only)
|
|
258
|
+
|
|
259
|
+
extra_headers: Send extra headers
|
|
260
|
+
|
|
261
|
+
extra_query: Add additional query parameters to the request
|
|
262
|
+
|
|
263
|
+
extra_body: Add additional JSON properties to the request
|
|
264
|
+
|
|
265
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
266
|
+
"""
|
|
267
|
+
return await self._post(
|
|
268
|
+
"/compute/v1/environments",
|
|
269
|
+
body=await async_maybe_transform({"name": name}, environment_create_params.EnvironmentCreateParams),
|
|
270
|
+
options=make_request_options(
|
|
271
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
272
|
+
),
|
|
273
|
+
cast_to=EnvironmentCreateResponse,
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
async def retrieve(
|
|
277
|
+
self,
|
|
278
|
+
name: str,
|
|
279
|
+
*,
|
|
280
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
281
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
282
|
+
extra_headers: Headers | None = None,
|
|
283
|
+
extra_query: Query | None = None,
|
|
284
|
+
extra_body: Body | None = None,
|
|
285
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
286
|
+
) -> None:
|
|
287
|
+
"""Retrieve a specific compute environment by name.
|
|
288
|
+
|
|
289
|
+
Returns environment
|
|
290
|
+
configuration including status, domain, and metadata for your serverless compute
|
|
291
|
+
infrastructure.
|
|
292
|
+
|
|
293
|
+
Args:
|
|
294
|
+
extra_headers: Send extra headers
|
|
295
|
+
|
|
296
|
+
extra_query: Add additional query parameters to the request
|
|
297
|
+
|
|
298
|
+
extra_body: Add additional JSON properties to the request
|
|
299
|
+
|
|
300
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
301
|
+
"""
|
|
302
|
+
if not name:
|
|
303
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
304
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
305
|
+
return await self._get(
|
|
306
|
+
f"/compute/v1/environments/{name}",
|
|
307
|
+
options=make_request_options(
|
|
308
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
309
|
+
),
|
|
310
|
+
cast_to=NoneType,
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
async def list(
|
|
314
|
+
self,
|
|
315
|
+
*,
|
|
316
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
317
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
318
|
+
extra_headers: Headers | None = None,
|
|
319
|
+
extra_query: Query | None = None,
|
|
320
|
+
extra_body: Body | None = None,
|
|
321
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
322
|
+
) -> None:
|
|
323
|
+
"""Retrieve all compute environments for your organization.
|
|
324
|
+
|
|
325
|
+
Environments provide
|
|
326
|
+
isolated execution contexts for running code and workflows.
|
|
327
|
+
"""
|
|
328
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
329
|
+
return await self._get(
|
|
330
|
+
"/compute/v1/environments",
|
|
331
|
+
options=make_request_options(
|
|
332
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
333
|
+
),
|
|
334
|
+
cast_to=NoneType,
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
async def delete(
|
|
338
|
+
self,
|
|
339
|
+
name: str,
|
|
340
|
+
*,
|
|
341
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
342
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
343
|
+
extra_headers: Headers | None = None,
|
|
344
|
+
extra_query: Query | None = None,
|
|
345
|
+
extra_body: Body | None = None,
|
|
346
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
347
|
+
) -> EnvironmentDeleteResponse:
|
|
348
|
+
"""Permanently delete a compute environment and all its associated resources.
|
|
349
|
+
|
|
350
|
+
This
|
|
351
|
+
will stop all running deployments and clean up related configurations. The
|
|
352
|
+
default environment cannot be deleted if other environments exist.
|
|
353
|
+
|
|
354
|
+
Args:
|
|
355
|
+
extra_headers: Send extra headers
|
|
356
|
+
|
|
357
|
+
extra_query: Add additional query parameters to the request
|
|
358
|
+
|
|
359
|
+
extra_body: Add additional JSON properties to the request
|
|
360
|
+
|
|
361
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
362
|
+
"""
|
|
363
|
+
if not name:
|
|
364
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
365
|
+
return await self._delete(
|
|
366
|
+
f"/compute/v1/environments/{name}",
|
|
367
|
+
options=make_request_options(
|
|
368
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
369
|
+
),
|
|
370
|
+
cast_to=EnvironmentDeleteResponse,
|
|
371
|
+
)
|
|
372
|
+
|
|
373
|
+
async def set_default(
|
|
374
|
+
self,
|
|
375
|
+
name: str,
|
|
376
|
+
*,
|
|
377
|
+
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
|
|
378
|
+
# The extra values given here take precedence over values defined on the client or passed to this method.
|
|
379
|
+
extra_headers: Headers | None = None,
|
|
380
|
+
extra_query: Query | None = None,
|
|
381
|
+
extra_body: Body | None = None,
|
|
382
|
+
timeout: float | httpx.Timeout | None | NotGiven = not_given,
|
|
383
|
+
) -> None:
|
|
384
|
+
"""Sets a compute environment as the default for the organization.
|
|
385
|
+
|
|
386
|
+
Only one
|
|
387
|
+
environment can be default at a time - setting a new default will automatically
|
|
388
|
+
unset the previous one.
|
|
389
|
+
|
|
390
|
+
Args:
|
|
391
|
+
extra_headers: Send extra headers
|
|
392
|
+
|
|
393
|
+
extra_query: Add additional query parameters to the request
|
|
394
|
+
|
|
395
|
+
extra_body: Add additional JSON properties to the request
|
|
396
|
+
|
|
397
|
+
timeout: Override the client-level default timeout for this request, in seconds
|
|
398
|
+
"""
|
|
399
|
+
if not name:
|
|
400
|
+
raise ValueError(f"Expected a non-empty value for `name` but received {name!r}")
|
|
401
|
+
extra_headers = {"Accept": "*/*", **(extra_headers or {})}
|
|
402
|
+
return await self._post(
|
|
403
|
+
f"/compute/v1/environments/{name}/default",
|
|
404
|
+
options=make_request_options(
|
|
405
|
+
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
|
|
406
|
+
),
|
|
407
|
+
cast_to=NoneType,
|
|
408
|
+
)
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
class EnvironmentsResourceWithRawResponse:
|
|
412
|
+
def __init__(self, environments: EnvironmentsResource) -> None:
|
|
413
|
+
self._environments = environments
|
|
414
|
+
|
|
415
|
+
self.create = to_raw_response_wrapper(
|
|
416
|
+
environments.create,
|
|
417
|
+
)
|
|
418
|
+
self.retrieve = to_raw_response_wrapper(
|
|
419
|
+
environments.retrieve,
|
|
420
|
+
)
|
|
421
|
+
self.list = to_raw_response_wrapper(
|
|
422
|
+
environments.list,
|
|
423
|
+
)
|
|
424
|
+
self.delete = to_raw_response_wrapper(
|
|
425
|
+
environments.delete,
|
|
426
|
+
)
|
|
427
|
+
self.set_default = to_raw_response_wrapper(
|
|
428
|
+
environments.set_default,
|
|
429
|
+
)
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
class AsyncEnvironmentsResourceWithRawResponse:
|
|
433
|
+
def __init__(self, environments: AsyncEnvironmentsResource) -> None:
|
|
434
|
+
self._environments = environments
|
|
435
|
+
|
|
436
|
+
self.create = async_to_raw_response_wrapper(
|
|
437
|
+
environments.create,
|
|
438
|
+
)
|
|
439
|
+
self.retrieve = async_to_raw_response_wrapper(
|
|
440
|
+
environments.retrieve,
|
|
441
|
+
)
|
|
442
|
+
self.list = async_to_raw_response_wrapper(
|
|
443
|
+
environments.list,
|
|
444
|
+
)
|
|
445
|
+
self.delete = async_to_raw_response_wrapper(
|
|
446
|
+
environments.delete,
|
|
447
|
+
)
|
|
448
|
+
self.set_default = async_to_raw_response_wrapper(
|
|
449
|
+
environments.set_default,
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
class EnvironmentsResourceWithStreamingResponse:
|
|
454
|
+
def __init__(self, environments: EnvironmentsResource) -> None:
|
|
455
|
+
self._environments = environments
|
|
456
|
+
|
|
457
|
+
self.create = to_streamed_response_wrapper(
|
|
458
|
+
environments.create,
|
|
459
|
+
)
|
|
460
|
+
self.retrieve = to_streamed_response_wrapper(
|
|
461
|
+
environments.retrieve,
|
|
462
|
+
)
|
|
463
|
+
self.list = to_streamed_response_wrapper(
|
|
464
|
+
environments.list,
|
|
465
|
+
)
|
|
466
|
+
self.delete = to_streamed_response_wrapper(
|
|
467
|
+
environments.delete,
|
|
468
|
+
)
|
|
469
|
+
self.set_default = to_streamed_response_wrapper(
|
|
470
|
+
environments.set_default,
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
class AsyncEnvironmentsResourceWithStreamingResponse:
|
|
475
|
+
def __init__(self, environments: AsyncEnvironmentsResource) -> None:
|
|
476
|
+
self._environments = environments
|
|
477
|
+
|
|
478
|
+
self.create = async_to_streamed_response_wrapper(
|
|
479
|
+
environments.create,
|
|
480
|
+
)
|
|
481
|
+
self.retrieve = async_to_streamed_response_wrapper(
|
|
482
|
+
environments.retrieve,
|
|
483
|
+
)
|
|
484
|
+
self.list = async_to_streamed_response_wrapper(
|
|
485
|
+
environments.list,
|
|
486
|
+
)
|
|
487
|
+
self.delete = async_to_streamed_response_wrapper(
|
|
488
|
+
environments.delete,
|
|
489
|
+
)
|
|
490
|
+
self.set_default = async_to_streamed_response_wrapper(
|
|
491
|
+
environments.set_default,
|
|
492
|
+
)
|