vellum-ai 1.11.2__py3-none-any.whl → 1.13.5__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.
Potentially problematic release.
This version of vellum-ai might be problematic. Click here for more details.
- vellum/__init__.py +18 -0
- vellum/client/README.md +1 -1
- vellum/client/core/client_wrapper.py +2 -2
- vellum/client/core/force_multipart.py +4 -2
- vellum/client/core/http_response.py +1 -1
- vellum/client/core/pydantic_utilities.py +7 -4
- vellum/client/errors/too_many_requests_error.py +1 -2
- vellum/client/reference.md +677 -76
- vellum/client/resources/container_images/client.py +299 -0
- vellum/client/resources/container_images/raw_client.py +286 -0
- vellum/client/resources/documents/client.py +20 -10
- vellum/client/resources/documents/raw_client.py +20 -10
- vellum/client/resources/events/raw_client.py +4 -4
- vellum/client/resources/integration_auth_configs/client.py +2 -0
- vellum/client/resources/integration_auth_configs/raw_client.py +2 -0
- vellum/client/resources/integration_providers/client.py +28 -2
- vellum/client/resources/integration_providers/raw_client.py +24 -0
- vellum/client/resources/integrations/client.py +52 -4
- vellum/client/resources/integrations/raw_client.py +61 -0
- vellum/client/resources/workflow_deployments/client.py +156 -0
- vellum/client/resources/workflow_deployments/raw_client.py +334 -0
- vellum/client/resources/workflows/client.py +212 -8
- vellum/client/resources/workflows/raw_client.py +343 -6
- vellum/client/types/__init__.py +18 -0
- vellum/client/types/api_actor_type_enum.py +1 -1
- vellum/client/types/check_workflow_execution_status_error.py +21 -0
- vellum/client/types/check_workflow_execution_status_response.py +29 -0
- vellum/client/types/code_execution_package_request.py +21 -0
- vellum/client/types/composio_execute_tool_request.py +5 -0
- vellum/client/types/composio_tool_definition.py +1 -0
- vellum/client/types/container_image_build_config.py +1 -0
- vellum/client/types/container_image_container_image_tag.py +1 -0
- vellum/client/types/dataset_row_push_request.py +3 -0
- vellum/client/types/document_document_to_document_index.py +1 -0
- vellum/client/types/integration_name.py +24 -0
- vellum/client/types/node_execution_fulfilled_body.py +1 -0
- vellum/client/types/node_execution_log_body.py +24 -0
- vellum/client/types/node_execution_log_event.py +47 -0
- vellum/client/types/prompt_deployment_release_prompt_deployment.py +1 -0
- vellum/client/types/runner_config_request.py +24 -0
- vellum/client/types/severity_enum.py +5 -0
- vellum/client/types/slim_composio_tool_definition.py +1 -0
- vellum/client/types/slim_document_document_to_document_index.py +2 -0
- vellum/client/types/type_checker_enum.py +5 -0
- vellum/client/types/vellum_audio.py +5 -1
- vellum/client/types/vellum_audio_request.py +5 -1
- vellum/client/types/vellum_document.py +5 -1
- vellum/client/types/vellum_document_request.py +5 -1
- vellum/client/types/vellum_image.py +5 -1
- vellum/client/types/vellum_image_request.py +5 -1
- vellum/client/types/vellum_node_execution_event.py +2 -0
- vellum/client/types/vellum_variable.py +5 -0
- vellum/client/types/vellum_variable_extensions.py +1 -0
- vellum/client/types/vellum_variable_type.py +1 -0
- vellum/client/types/vellum_video.py +5 -1
- vellum/client/types/vellum_video_request.py +5 -1
- vellum/client/types/workflow_deployment_release_workflow_deployment.py +1 -0
- vellum/client/types/workflow_event.py +2 -0
- vellum/client/types/workflow_execution_fulfilled_body.py +1 -0
- vellum/client/types/workflow_result_event_output_data_array.py +1 -1
- vellum/client/types/workflow_result_event_output_data_chat_history.py +1 -1
- vellum/client/types/workflow_result_event_output_data_error.py +1 -1
- vellum/client/types/workflow_result_event_output_data_function_call.py +1 -1
- vellum/client/types/workflow_result_event_output_data_json.py +1 -1
- vellum/client/types/workflow_result_event_output_data_number.py +1 -1
- vellum/client/types/workflow_result_event_output_data_search_results.py +1 -1
- vellum/client/types/workflow_result_event_output_data_string.py +1 -1
- vellum/client/types/workflow_sandbox_execute_node_response.py +8 -0
- vellum/plugins/vellum_mypy.py +37 -2
- vellum/types/check_workflow_execution_status_error.py +3 -0
- vellum/types/check_workflow_execution_status_response.py +3 -0
- vellum/types/code_execution_package_request.py +3 -0
- vellum/types/node_execution_log_body.py +3 -0
- vellum/types/node_execution_log_event.py +3 -0
- vellum/types/runner_config_request.py +3 -0
- vellum/types/severity_enum.py +3 -0
- vellum/types/type_checker_enum.py +3 -0
- vellum/types/workflow_sandbox_execute_node_response.py +3 -0
- vellum/utils/files/mixin.py +26 -0
- vellum/utils/files/tests/test_mixin.py +62 -0
- vellum/utils/tests/test_vellum_client.py +95 -0
- vellum/utils/uuid.py +19 -2
- vellum/utils/vellum_client.py +10 -3
- vellum/workflows/__init__.py +7 -1
- vellum/workflows/descriptors/base.py +86 -0
- vellum/workflows/descriptors/tests/test_utils.py +9 -0
- vellum/workflows/errors/tests/__init__.py +0 -0
- vellum/workflows/errors/tests/test_types.py +52 -0
- vellum/workflows/errors/types.py +1 -0
- vellum/workflows/events/node.py +24 -0
- vellum/workflows/events/tests/test_event.py +123 -0
- vellum/workflows/events/types.py +2 -1
- vellum/workflows/events/workflow.py +28 -2
- vellum/workflows/expressions/add.py +3 -0
- vellum/workflows/expressions/tests/test_add.py +24 -0
- vellum/workflows/graph/graph.py +26 -5
- vellum/workflows/graph/tests/test_graph.py +228 -1
- vellum/workflows/inputs/base.py +22 -6
- vellum/workflows/inputs/dataset_row.py +121 -16
- vellum/workflows/inputs/tests/test_inputs.py +3 -3
- vellum/workflows/integrations/tests/test_vellum_integration_service.py +84 -0
- vellum/workflows/integrations/vellum_integration_service.py +12 -1
- vellum/workflows/loaders/base.py +2 -0
- vellum/workflows/nodes/bases/base.py +37 -16
- vellum/workflows/nodes/bases/tests/test_base_node.py +104 -1
- vellum/workflows/nodes/core/inline_subworkflow_node/node.py +1 -0
- vellum/workflows/nodes/core/inline_subworkflow_node/tests/test_node.py +1 -1
- vellum/workflows/nodes/core/map_node/node.py +7 -5
- vellum/workflows/nodes/core/map_node/tests/test_node.py +33 -0
- vellum/workflows/nodes/core/retry_node/node.py +1 -0
- vellum/workflows/nodes/core/try_node/node.py +1 -0
- vellum/workflows/nodes/displayable/api_node/node.py +3 -2
- vellum/workflows/nodes/displayable/api_node/tests/test_api_node.py +38 -0
- vellum/workflows/nodes/displayable/bases/api_node/node.py +1 -1
- vellum/workflows/nodes/displayable/bases/base_prompt_node/node.py +18 -1
- vellum/workflows/nodes/displayable/bases/inline_prompt_node/node.py +109 -2
- vellum/workflows/nodes/displayable/bases/prompt_deployment_node.py +13 -2
- vellum/workflows/nodes/displayable/code_execution_node/node.py +9 -15
- vellum/workflows/nodes/displayable/code_execution_node/tests/test_node.py +65 -24
- vellum/workflows/nodes/displayable/code_execution_node/utils.py +3 -0
- vellum/workflows/nodes/displayable/final_output_node/node.py +24 -69
- vellum/workflows/nodes/displayable/final_output_node/tests/test_node.py +53 -3
- vellum/workflows/nodes/displayable/note_node/node.py +4 -1
- vellum/workflows/nodes/displayable/subworkflow_deployment_node/node.py +16 -5
- vellum/workflows/nodes/displayable/tests/test_text_prompt_deployment_node.py +47 -0
- vellum/workflows/nodes/displayable/tool_calling_node/node.py +74 -34
- vellum/workflows/nodes/displayable/tool_calling_node/tests/test_node.py +204 -8
- vellum/workflows/nodes/displayable/tool_calling_node/utils.py +92 -71
- vellum/workflows/nodes/mocks.py +47 -213
- vellum/workflows/nodes/tests/test_mocks.py +0 -177
- vellum/workflows/nodes/utils.py +23 -8
- vellum/workflows/outputs/base.py +36 -3
- vellum/workflows/references/environment_variable.py +1 -11
- vellum/workflows/references/lazy.py +8 -0
- vellum/workflows/references/state_value.py +24 -1
- vellum/workflows/references/tests/test_lazy.py +58 -0
- vellum/workflows/references/trigger.py +8 -3
- vellum/workflows/references/workflow_input.py +8 -0
- vellum/workflows/resolvers/resolver.py +13 -3
- vellum/workflows/resolvers/tests/test_resolver.py +31 -0
- vellum/workflows/runner/runner.py +159 -14
- vellum/workflows/runner/tests/__init__.py +0 -0
- vellum/workflows/runner/tests/test_runner.py +170 -0
- vellum/workflows/sandbox.py +7 -8
- vellum/workflows/state/base.py +89 -30
- vellum/workflows/state/context.py +74 -3
- vellum/workflows/state/tests/test_state.py +269 -1
- vellum/workflows/tests/test_dataset_row.py +8 -7
- vellum/workflows/tests/test_sandbox.py +97 -8
- vellum/workflows/triggers/__init__.py +2 -1
- vellum/workflows/triggers/base.py +160 -28
- vellum/workflows/triggers/chat_message.py +141 -0
- vellum/workflows/triggers/integration.py +12 -0
- vellum/workflows/triggers/manual.py +3 -1
- vellum/workflows/triggers/schedule.py +3 -1
- vellum/workflows/triggers/tests/test_chat_message.py +257 -0
- vellum/workflows/types/core.py +18 -0
- vellum/workflows/types/definition.py +6 -13
- vellum/workflows/types/generics.py +12 -0
- vellum/workflows/types/tests/test_utils.py +12 -0
- vellum/workflows/types/utils.py +32 -2
- vellum/workflows/types/workflow_metadata.py +124 -0
- vellum/workflows/utils/functions.py +152 -16
- vellum/workflows/utils/pydantic_schema.py +19 -1
- vellum/workflows/utils/tests/test_functions.py +123 -8
- vellum/workflows/utils/tests/test_validate.py +79 -0
- vellum/workflows/utils/tests/test_vellum_variables.py +62 -2
- vellum/workflows/utils/uuids.py +90 -0
- vellum/workflows/utils/validate.py +108 -0
- vellum/workflows/utils/vellum_variables.py +96 -16
- vellum/workflows/workflows/base.py +177 -35
- vellum/workflows/workflows/tests/test_base_workflow.py +51 -0
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/METADATA +6 -1
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/RECORD +274 -227
- vellum_cli/__init__.py +21 -0
- vellum_cli/config.py +16 -2
- vellum_cli/pull.py +2 -0
- vellum_cli/push.py +23 -10
- vellum_cli/tests/conftest.py +8 -13
- vellum_cli/tests/test_image_push.py +4 -11
- vellum_cli/tests/test_pull.py +83 -68
- vellum_cli/tests/test_push.py +251 -2
- vellum_ee/assets/node-definitions.json +225 -12
- vellum_ee/scripts/generate_node_definitions.py +15 -3
- vellum_ee/workflows/display/base.py +4 -3
- vellum_ee/workflows/display/nodes/base_node_display.py +44 -11
- vellum_ee/workflows/display/nodes/tests/test_base_node_display.py +93 -0
- vellum_ee/workflows/display/nodes/types.py +1 -0
- vellum_ee/workflows/display/nodes/vellum/__init__.py +0 -2
- vellum_ee/workflows/display/nodes/vellum/base_adornment_node.py +5 -2
- vellum_ee/workflows/display/nodes/vellum/code_execution_node.py +1 -1
- vellum_ee/workflows/display/nodes/vellum/inline_prompt_node.py +10 -2
- vellum_ee/workflows/display/nodes/vellum/inline_subworkflow_node.py +17 -14
- vellum_ee/workflows/display/nodes/vellum/map_node.py +2 -0
- vellum_ee/workflows/display/nodes/vellum/note_node.py +18 -3
- vellum_ee/workflows/display/nodes/vellum/subworkflow_deployment_node.py +37 -14
- vellum_ee/workflows/display/nodes/vellum/tests/test_code_execution_node.py +62 -2
- vellum_ee/workflows/display/nodes/vellum/tests/test_final_output_node.py +136 -0
- vellum_ee/workflows/display/nodes/vellum/tests/test_note_node.py +44 -7
- vellum_ee/workflows/display/nodes/vellum/tests/test_prompt_node.py +5 -13
- vellum_ee/workflows/display/nodes/vellum/tests/test_subworkflow_deployment_node.py +27 -17
- vellum_ee/workflows/display/nodes/vellum/tests/test_tool_calling_node.py +145 -22
- vellum_ee/workflows/display/nodes/vellum/tests/test_utils.py +107 -2
- vellum_ee/workflows/display/nodes/vellum/utils.py +54 -12
- vellum_ee/workflows/display/tests/test_base_workflow_display.py +13 -16
- vellum_ee/workflows/display/tests/test_json_schema_validation.py +190 -0
- vellum_ee/workflows/display/tests/test_mocks.py +912 -0
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_adornments_serialization.py +14 -2
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_attributes_serialization.py +109 -0
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_outputs_serialization.py +3 -0
- vellum_ee/workflows/display/tests/workflow_serialization/generic_nodes/test_ports_serialization.py +187 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_api_node_serialization.py +34 -325
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_code_execution_node_serialization.py +42 -393
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_conditional_node_serialization.py +13 -315
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_default_state_serialization.py +2 -122
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_error_node_serialization.py +24 -115
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_generic_node_serialization.py +4 -93
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_guardrail_node_serialization.py +7 -80
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_prompt_node_serialization.py +9 -101
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_inline_subworkflow_serialization.py +77 -308
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_map_node_serialization.py +62 -324
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_merge_node_serialization.py +3 -82
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_prompt_deployment_serialization.py +4 -142
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_search_node_serialization.py +1 -61
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_set_state_node_serialization.py +4 -4
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_subworkflow_deployment_serialization.py +205 -134
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_templating_node_serialization.py +34 -146
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_terminal_node_serialization.py +2 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_composio_serialization.py +8 -6
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_inline_workflow_serialization.py +137 -266
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_inline_workflow_tool_wrapper_serialization.py +84 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_mcp_serialization.py +55 -16
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_serialization.py +15 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_tool_wrapper_serialization.py +71 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_vellum_integration_serialization.py +119 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_tool_calling_node_workflow_deployment_serialization.py +1 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_basic_try_node_serialization.py +0 -2
- vellum_ee/workflows/display/tests/workflow_serialization/test_chat_message_dict_reference_serialization.py +22 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_chat_message_trigger_serialization.py +412 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_code_tool_node_reference_error.py +106 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_complex_terminal_node_serialization.py +9 -41
- vellum_ee/workflows/display/tests/workflow_serialization/test_duplicate_trigger_name_validation.py +208 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_final_output_node_not_referenced_by_workflow_outputs.py +45 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_infinite_loop_validation.py +66 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_int_input_serialization.py +40 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_serialization.py +8 -14
- vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_validation.py +173 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_integration_trigger_with_entrypoint_node_id.py +16 -13
- vellum_ee/workflows/display/tests/workflow_serialization/test_list_vellum_document_serialization.py +5 -1
- vellum_ee/workflows/display/tests/workflow_serialization/test_manual_trigger_serialization.py +12 -2
- vellum_ee/workflows/display/tests/workflow_serialization/test_multi_trigger_same_node_serialization.py +111 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_no_triggers_no_entrypoint_validation.py +64 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_partial_workflow_meta_display_override.py +55 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_sandbox_dataset_mocks_serialization.py +268 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_sandbox_invalid_pdf_data_url.py +49 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_sandbox_validation_errors.py +112 -0
- vellum_ee/workflows/display/tests/workflow_serialization/test_scheduled_trigger_serialization.py +25 -16
- vellum_ee/workflows/display/tests/workflow_serialization/test_terminal_node_in_unused_graphs_serialization.py +53 -0
- vellum_ee/workflows/display/utils/exceptions.py +34 -0
- vellum_ee/workflows/display/utils/expressions.py +463 -52
- vellum_ee/workflows/display/utils/metadata.py +98 -33
- vellum_ee/workflows/display/utils/tests/test_metadata.py +31 -0
- vellum_ee/workflows/display/utils/triggers.py +153 -0
- vellum_ee/workflows/display/utils/vellum.py +59 -5
- vellum_ee/workflows/display/workflows/base_workflow_display.py +656 -254
- vellum_ee/workflows/display/workflows/get_vellum_workflow_display_class.py +26 -0
- vellum_ee/workflows/display/workflows/tests/test_workflow_display.py +77 -29
- vellum_ee/workflows/server/namespaces.py +18 -0
- vellum_ee/workflows/tests/test_display_meta.py +2 -0
- vellum_ee/workflows/tests/test_serialize_module.py +174 -7
- vellum_ee/workflows/tests/test_server.py +0 -3
- vellum_ee/workflows/display/nodes/vellum/function_node.py +0 -14
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/LICENSE +0 -0
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/WHEEL +0 -0
- {vellum_ai-1.11.2.dist-info → vellum_ai-1.13.5.dist-info}/entry_points.txt +0 -0
|
@@ -4,6 +4,7 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
6
6
|
from ...core.request_options import RequestOptions
|
|
7
|
+
from ...types.code_execution_package_request import CodeExecutionPackageRequest
|
|
7
8
|
from ...types.container_image_read import ContainerImageRead
|
|
8
9
|
from ...types.docker_service_token import DockerServiceToken
|
|
9
10
|
from ...types.paginated_container_image_read_list import PaginatedContainerImageReadList
|
|
@@ -77,6 +78,76 @@ class ContainerImagesClient:
|
|
|
77
78
|
)
|
|
78
79
|
return _response.data
|
|
79
80
|
|
|
81
|
+
def create_container_image(
|
|
82
|
+
self,
|
|
83
|
+
*,
|
|
84
|
+
name: str,
|
|
85
|
+
packages: typing.Sequence[CodeExecutionPackageRequest],
|
|
86
|
+
tag: str,
|
|
87
|
+
user_script: typing.Optional[str] = OMIT,
|
|
88
|
+
is_hotswappable: typing.Optional[bool] = OMIT,
|
|
89
|
+
server_version: typing.Optional[str] = OMIT,
|
|
90
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
91
|
+
) -> ContainerImageRead:
|
|
92
|
+
"""
|
|
93
|
+
Create a new Container Image.
|
|
94
|
+
|
|
95
|
+
Parameters
|
|
96
|
+
----------
|
|
97
|
+
name : str
|
|
98
|
+
|
|
99
|
+
packages : typing.Sequence[CodeExecutionPackageRequest]
|
|
100
|
+
|
|
101
|
+
tag : str
|
|
102
|
+
|
|
103
|
+
user_script : typing.Optional[str]
|
|
104
|
+
|
|
105
|
+
is_hotswappable : typing.Optional[bool]
|
|
106
|
+
|
|
107
|
+
server_version : typing.Optional[str]
|
|
108
|
+
|
|
109
|
+
request_options : typing.Optional[RequestOptions]
|
|
110
|
+
Request-specific configuration.
|
|
111
|
+
|
|
112
|
+
Returns
|
|
113
|
+
-------
|
|
114
|
+
ContainerImageRead
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
Examples
|
|
118
|
+
--------
|
|
119
|
+
from vellum import CodeExecutionPackageRequest, Vellum
|
|
120
|
+
|
|
121
|
+
client = Vellum(
|
|
122
|
+
api_version="YOUR_API_VERSION",
|
|
123
|
+
api_key="YOUR_API_KEY",
|
|
124
|
+
)
|
|
125
|
+
client.container_images.create_container_image(
|
|
126
|
+
name="x",
|
|
127
|
+
packages=[
|
|
128
|
+
CodeExecutionPackageRequest(
|
|
129
|
+
version="x",
|
|
130
|
+
name="x",
|
|
131
|
+
),
|
|
132
|
+
CodeExecutionPackageRequest(
|
|
133
|
+
version="x",
|
|
134
|
+
name="x",
|
|
135
|
+
),
|
|
136
|
+
],
|
|
137
|
+
tag="x",
|
|
138
|
+
)
|
|
139
|
+
"""
|
|
140
|
+
_response = self._raw_client.create_container_image(
|
|
141
|
+
name=name,
|
|
142
|
+
packages=packages,
|
|
143
|
+
tag=tag,
|
|
144
|
+
user_script=user_script,
|
|
145
|
+
is_hotswappable=is_hotswappable,
|
|
146
|
+
server_version=server_version,
|
|
147
|
+
request_options=request_options,
|
|
148
|
+
)
|
|
149
|
+
return _response.data
|
|
150
|
+
|
|
80
151
|
def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ContainerImageRead:
|
|
81
152
|
"""
|
|
82
153
|
Retrieve a Container Image by its ID or name.
|
|
@@ -109,6 +180,77 @@ class ContainerImagesClient:
|
|
|
109
180
|
_response = self._raw_client.retrieve(id, request_options=request_options)
|
|
110
181
|
return _response.data
|
|
111
182
|
|
|
183
|
+
def update_container_image(
|
|
184
|
+
self,
|
|
185
|
+
id: str,
|
|
186
|
+
*,
|
|
187
|
+
packages: typing.Sequence[CodeExecutionPackageRequest],
|
|
188
|
+
tag: str,
|
|
189
|
+
user_script: typing.Optional[str] = OMIT,
|
|
190
|
+
is_hotswappable: typing.Optional[bool] = OMIT,
|
|
191
|
+
server_version: typing.Optional[str] = OMIT,
|
|
192
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
193
|
+
) -> ContainerImageRead:
|
|
194
|
+
"""
|
|
195
|
+
Update an existing Container Image.
|
|
196
|
+
|
|
197
|
+
Parameters
|
|
198
|
+
----------
|
|
199
|
+
id : str
|
|
200
|
+
A UUID string identifying this container image.
|
|
201
|
+
|
|
202
|
+
packages : typing.Sequence[CodeExecutionPackageRequest]
|
|
203
|
+
|
|
204
|
+
tag : str
|
|
205
|
+
|
|
206
|
+
user_script : typing.Optional[str]
|
|
207
|
+
|
|
208
|
+
is_hotswappable : typing.Optional[bool]
|
|
209
|
+
|
|
210
|
+
server_version : typing.Optional[str]
|
|
211
|
+
|
|
212
|
+
request_options : typing.Optional[RequestOptions]
|
|
213
|
+
Request-specific configuration.
|
|
214
|
+
|
|
215
|
+
Returns
|
|
216
|
+
-------
|
|
217
|
+
ContainerImageRead
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
Examples
|
|
221
|
+
--------
|
|
222
|
+
from vellum import CodeExecutionPackageRequest, Vellum
|
|
223
|
+
|
|
224
|
+
client = Vellum(
|
|
225
|
+
api_version="YOUR_API_VERSION",
|
|
226
|
+
api_key="YOUR_API_KEY",
|
|
227
|
+
)
|
|
228
|
+
client.container_images.update_container_image(
|
|
229
|
+
id="id",
|
|
230
|
+
packages=[
|
|
231
|
+
CodeExecutionPackageRequest(
|
|
232
|
+
version="x",
|
|
233
|
+
name="x",
|
|
234
|
+
),
|
|
235
|
+
CodeExecutionPackageRequest(
|
|
236
|
+
version="x",
|
|
237
|
+
name="x",
|
|
238
|
+
),
|
|
239
|
+
],
|
|
240
|
+
tag="x",
|
|
241
|
+
)
|
|
242
|
+
"""
|
|
243
|
+
_response = self._raw_client.update_container_image(
|
|
244
|
+
id,
|
|
245
|
+
packages=packages,
|
|
246
|
+
tag=tag,
|
|
247
|
+
user_script=user_script,
|
|
248
|
+
is_hotswappable=is_hotswappable,
|
|
249
|
+
server_version=server_version,
|
|
250
|
+
request_options=request_options,
|
|
251
|
+
)
|
|
252
|
+
return _response.data
|
|
253
|
+
|
|
112
254
|
def docker_service_token(self, *, request_options: typing.Optional[RequestOptions] = None) -> DockerServiceToken:
|
|
113
255
|
"""
|
|
114
256
|
Parameters
|
|
@@ -250,6 +392,84 @@ class AsyncContainerImagesClient:
|
|
|
250
392
|
)
|
|
251
393
|
return _response.data
|
|
252
394
|
|
|
395
|
+
async def create_container_image(
|
|
396
|
+
self,
|
|
397
|
+
*,
|
|
398
|
+
name: str,
|
|
399
|
+
packages: typing.Sequence[CodeExecutionPackageRequest],
|
|
400
|
+
tag: str,
|
|
401
|
+
user_script: typing.Optional[str] = OMIT,
|
|
402
|
+
is_hotswappable: typing.Optional[bool] = OMIT,
|
|
403
|
+
server_version: typing.Optional[str] = OMIT,
|
|
404
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
405
|
+
) -> ContainerImageRead:
|
|
406
|
+
"""
|
|
407
|
+
Create a new Container Image.
|
|
408
|
+
|
|
409
|
+
Parameters
|
|
410
|
+
----------
|
|
411
|
+
name : str
|
|
412
|
+
|
|
413
|
+
packages : typing.Sequence[CodeExecutionPackageRequest]
|
|
414
|
+
|
|
415
|
+
tag : str
|
|
416
|
+
|
|
417
|
+
user_script : typing.Optional[str]
|
|
418
|
+
|
|
419
|
+
is_hotswappable : typing.Optional[bool]
|
|
420
|
+
|
|
421
|
+
server_version : typing.Optional[str]
|
|
422
|
+
|
|
423
|
+
request_options : typing.Optional[RequestOptions]
|
|
424
|
+
Request-specific configuration.
|
|
425
|
+
|
|
426
|
+
Returns
|
|
427
|
+
-------
|
|
428
|
+
ContainerImageRead
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
Examples
|
|
432
|
+
--------
|
|
433
|
+
import asyncio
|
|
434
|
+
|
|
435
|
+
from vellum import AsyncVellum, CodeExecutionPackageRequest
|
|
436
|
+
|
|
437
|
+
client = AsyncVellum(
|
|
438
|
+
api_version="YOUR_API_VERSION",
|
|
439
|
+
api_key="YOUR_API_KEY",
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
async def main() -> None:
|
|
444
|
+
await client.container_images.create_container_image(
|
|
445
|
+
name="x",
|
|
446
|
+
packages=[
|
|
447
|
+
CodeExecutionPackageRequest(
|
|
448
|
+
version="x",
|
|
449
|
+
name="x",
|
|
450
|
+
),
|
|
451
|
+
CodeExecutionPackageRequest(
|
|
452
|
+
version="x",
|
|
453
|
+
name="x",
|
|
454
|
+
),
|
|
455
|
+
],
|
|
456
|
+
tag="x",
|
|
457
|
+
)
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
asyncio.run(main())
|
|
461
|
+
"""
|
|
462
|
+
_response = await self._raw_client.create_container_image(
|
|
463
|
+
name=name,
|
|
464
|
+
packages=packages,
|
|
465
|
+
tag=tag,
|
|
466
|
+
user_script=user_script,
|
|
467
|
+
is_hotswappable=is_hotswappable,
|
|
468
|
+
server_version=server_version,
|
|
469
|
+
request_options=request_options,
|
|
470
|
+
)
|
|
471
|
+
return _response.data
|
|
472
|
+
|
|
253
473
|
async def retrieve(self, id: str, *, request_options: typing.Optional[RequestOptions] = None) -> ContainerImageRead:
|
|
254
474
|
"""
|
|
255
475
|
Retrieve a Container Image by its ID or name.
|
|
@@ -290,6 +510,85 @@ class AsyncContainerImagesClient:
|
|
|
290
510
|
_response = await self._raw_client.retrieve(id, request_options=request_options)
|
|
291
511
|
return _response.data
|
|
292
512
|
|
|
513
|
+
async def update_container_image(
|
|
514
|
+
self,
|
|
515
|
+
id: str,
|
|
516
|
+
*,
|
|
517
|
+
packages: typing.Sequence[CodeExecutionPackageRequest],
|
|
518
|
+
tag: str,
|
|
519
|
+
user_script: typing.Optional[str] = OMIT,
|
|
520
|
+
is_hotswappable: typing.Optional[bool] = OMIT,
|
|
521
|
+
server_version: typing.Optional[str] = OMIT,
|
|
522
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
523
|
+
) -> ContainerImageRead:
|
|
524
|
+
"""
|
|
525
|
+
Update an existing Container Image.
|
|
526
|
+
|
|
527
|
+
Parameters
|
|
528
|
+
----------
|
|
529
|
+
id : str
|
|
530
|
+
A UUID string identifying this container image.
|
|
531
|
+
|
|
532
|
+
packages : typing.Sequence[CodeExecutionPackageRequest]
|
|
533
|
+
|
|
534
|
+
tag : str
|
|
535
|
+
|
|
536
|
+
user_script : typing.Optional[str]
|
|
537
|
+
|
|
538
|
+
is_hotswappable : typing.Optional[bool]
|
|
539
|
+
|
|
540
|
+
server_version : typing.Optional[str]
|
|
541
|
+
|
|
542
|
+
request_options : typing.Optional[RequestOptions]
|
|
543
|
+
Request-specific configuration.
|
|
544
|
+
|
|
545
|
+
Returns
|
|
546
|
+
-------
|
|
547
|
+
ContainerImageRead
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
Examples
|
|
551
|
+
--------
|
|
552
|
+
import asyncio
|
|
553
|
+
|
|
554
|
+
from vellum import AsyncVellum, CodeExecutionPackageRequest
|
|
555
|
+
|
|
556
|
+
client = AsyncVellum(
|
|
557
|
+
api_version="YOUR_API_VERSION",
|
|
558
|
+
api_key="YOUR_API_KEY",
|
|
559
|
+
)
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
async def main() -> None:
|
|
563
|
+
await client.container_images.update_container_image(
|
|
564
|
+
id="id",
|
|
565
|
+
packages=[
|
|
566
|
+
CodeExecutionPackageRequest(
|
|
567
|
+
version="x",
|
|
568
|
+
name="x",
|
|
569
|
+
),
|
|
570
|
+
CodeExecutionPackageRequest(
|
|
571
|
+
version="x",
|
|
572
|
+
name="x",
|
|
573
|
+
),
|
|
574
|
+
],
|
|
575
|
+
tag="x",
|
|
576
|
+
)
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
asyncio.run(main())
|
|
580
|
+
"""
|
|
581
|
+
_response = await self._raw_client.update_container_image(
|
|
582
|
+
id,
|
|
583
|
+
packages=packages,
|
|
584
|
+
tag=tag,
|
|
585
|
+
user_script=user_script,
|
|
586
|
+
is_hotswappable=is_hotswappable,
|
|
587
|
+
server_version=server_version,
|
|
588
|
+
request_options=request_options,
|
|
589
|
+
)
|
|
590
|
+
return _response.data
|
|
591
|
+
|
|
293
592
|
async def docker_service_token(
|
|
294
593
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
295
594
|
) -> DockerServiceToken:
|
|
@@ -9,6 +9,8 @@ from ...core.http_response import AsyncHttpResponse, HttpResponse
|
|
|
9
9
|
from ...core.jsonable_encoder import jsonable_encoder
|
|
10
10
|
from ...core.pydantic_utilities import parse_obj_as
|
|
11
11
|
from ...core.request_options import RequestOptions
|
|
12
|
+
from ...core.serialization import convert_and_respect_annotation_metadata
|
|
13
|
+
from ...types.code_execution_package_request import CodeExecutionPackageRequest
|
|
12
14
|
from ...types.container_image_read import ContainerImageRead
|
|
13
15
|
from ...types.docker_service_token import DockerServiceToken
|
|
14
16
|
from ...types.paginated_container_image_read_list import PaginatedContainerImageReadList
|
|
@@ -77,6 +79,77 @@ class RawContainerImagesClient:
|
|
|
77
79
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
78
80
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
79
81
|
|
|
82
|
+
def create_container_image(
|
|
83
|
+
self,
|
|
84
|
+
*,
|
|
85
|
+
name: str,
|
|
86
|
+
packages: typing.Sequence[CodeExecutionPackageRequest],
|
|
87
|
+
tag: str,
|
|
88
|
+
user_script: typing.Optional[str] = OMIT,
|
|
89
|
+
is_hotswappable: typing.Optional[bool] = OMIT,
|
|
90
|
+
server_version: typing.Optional[str] = OMIT,
|
|
91
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
92
|
+
) -> HttpResponse[ContainerImageRead]:
|
|
93
|
+
"""
|
|
94
|
+
Create a new Container Image.
|
|
95
|
+
|
|
96
|
+
Parameters
|
|
97
|
+
----------
|
|
98
|
+
name : str
|
|
99
|
+
|
|
100
|
+
packages : typing.Sequence[CodeExecutionPackageRequest]
|
|
101
|
+
|
|
102
|
+
tag : str
|
|
103
|
+
|
|
104
|
+
user_script : typing.Optional[str]
|
|
105
|
+
|
|
106
|
+
is_hotswappable : typing.Optional[bool]
|
|
107
|
+
|
|
108
|
+
server_version : typing.Optional[str]
|
|
109
|
+
|
|
110
|
+
request_options : typing.Optional[RequestOptions]
|
|
111
|
+
Request-specific configuration.
|
|
112
|
+
|
|
113
|
+
Returns
|
|
114
|
+
-------
|
|
115
|
+
HttpResponse[ContainerImageRead]
|
|
116
|
+
|
|
117
|
+
"""
|
|
118
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
119
|
+
"v1/container-images",
|
|
120
|
+
base_url=self._client_wrapper.get_environment().default,
|
|
121
|
+
method="POST",
|
|
122
|
+
json={
|
|
123
|
+
"name": name,
|
|
124
|
+
"packages": convert_and_respect_annotation_metadata(
|
|
125
|
+
object_=packages, annotation=typing.Sequence[CodeExecutionPackageRequest], direction="write"
|
|
126
|
+
),
|
|
127
|
+
"tag": tag,
|
|
128
|
+
"user_script": user_script,
|
|
129
|
+
"is_hotswappable": is_hotswappable,
|
|
130
|
+
"server_version": server_version,
|
|
131
|
+
},
|
|
132
|
+
headers={
|
|
133
|
+
"content-type": "application/json",
|
|
134
|
+
},
|
|
135
|
+
request_options=request_options,
|
|
136
|
+
omit=OMIT,
|
|
137
|
+
)
|
|
138
|
+
try:
|
|
139
|
+
if 200 <= _response.status_code < 300:
|
|
140
|
+
_data = typing.cast(
|
|
141
|
+
ContainerImageRead,
|
|
142
|
+
parse_obj_as(
|
|
143
|
+
type_=ContainerImageRead, # type: ignore
|
|
144
|
+
object_=_response.json(),
|
|
145
|
+
),
|
|
146
|
+
)
|
|
147
|
+
return HttpResponse(response=_response, data=_data)
|
|
148
|
+
_response_json = _response.json()
|
|
149
|
+
except JSONDecodeError:
|
|
150
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
151
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
152
|
+
|
|
80
153
|
def retrieve(
|
|
81
154
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
82
155
|
) -> HttpResponse[ContainerImageRead]:
|
|
@@ -117,6 +190,77 @@ class RawContainerImagesClient:
|
|
|
117
190
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
118
191
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
119
192
|
|
|
193
|
+
def update_container_image(
|
|
194
|
+
self,
|
|
195
|
+
id: str,
|
|
196
|
+
*,
|
|
197
|
+
packages: typing.Sequence[CodeExecutionPackageRequest],
|
|
198
|
+
tag: str,
|
|
199
|
+
user_script: typing.Optional[str] = OMIT,
|
|
200
|
+
is_hotswappable: typing.Optional[bool] = OMIT,
|
|
201
|
+
server_version: typing.Optional[str] = OMIT,
|
|
202
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
203
|
+
) -> HttpResponse[ContainerImageRead]:
|
|
204
|
+
"""
|
|
205
|
+
Update an existing Container Image.
|
|
206
|
+
|
|
207
|
+
Parameters
|
|
208
|
+
----------
|
|
209
|
+
id : str
|
|
210
|
+
A UUID string identifying this container image.
|
|
211
|
+
|
|
212
|
+
packages : typing.Sequence[CodeExecutionPackageRequest]
|
|
213
|
+
|
|
214
|
+
tag : str
|
|
215
|
+
|
|
216
|
+
user_script : typing.Optional[str]
|
|
217
|
+
|
|
218
|
+
is_hotswappable : typing.Optional[bool]
|
|
219
|
+
|
|
220
|
+
server_version : typing.Optional[str]
|
|
221
|
+
|
|
222
|
+
request_options : typing.Optional[RequestOptions]
|
|
223
|
+
Request-specific configuration.
|
|
224
|
+
|
|
225
|
+
Returns
|
|
226
|
+
-------
|
|
227
|
+
HttpResponse[ContainerImageRead]
|
|
228
|
+
|
|
229
|
+
"""
|
|
230
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
231
|
+
f"v1/container-images/{jsonable_encoder(id)}",
|
|
232
|
+
base_url=self._client_wrapper.get_environment().default,
|
|
233
|
+
method="PUT",
|
|
234
|
+
json={
|
|
235
|
+
"packages": convert_and_respect_annotation_metadata(
|
|
236
|
+
object_=packages, annotation=typing.Sequence[CodeExecutionPackageRequest], direction="write"
|
|
237
|
+
),
|
|
238
|
+
"tag": tag,
|
|
239
|
+
"user_script": user_script,
|
|
240
|
+
"is_hotswappable": is_hotswappable,
|
|
241
|
+
"server_version": server_version,
|
|
242
|
+
},
|
|
243
|
+
headers={
|
|
244
|
+
"content-type": "application/json",
|
|
245
|
+
},
|
|
246
|
+
request_options=request_options,
|
|
247
|
+
omit=OMIT,
|
|
248
|
+
)
|
|
249
|
+
try:
|
|
250
|
+
if 200 <= _response.status_code < 300:
|
|
251
|
+
_data = typing.cast(
|
|
252
|
+
ContainerImageRead,
|
|
253
|
+
parse_obj_as(
|
|
254
|
+
type_=ContainerImageRead, # type: ignore
|
|
255
|
+
object_=_response.json(),
|
|
256
|
+
),
|
|
257
|
+
)
|
|
258
|
+
return HttpResponse(response=_response, data=_data)
|
|
259
|
+
_response_json = _response.json()
|
|
260
|
+
except JSONDecodeError:
|
|
261
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
262
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
263
|
+
|
|
120
264
|
def docker_service_token(
|
|
121
265
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
122
266
|
) -> HttpResponse[DockerServiceToken]:
|
|
@@ -272,6 +416,77 @@ class AsyncRawContainerImagesClient:
|
|
|
272
416
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
273
417
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
274
418
|
|
|
419
|
+
async def create_container_image(
|
|
420
|
+
self,
|
|
421
|
+
*,
|
|
422
|
+
name: str,
|
|
423
|
+
packages: typing.Sequence[CodeExecutionPackageRequest],
|
|
424
|
+
tag: str,
|
|
425
|
+
user_script: typing.Optional[str] = OMIT,
|
|
426
|
+
is_hotswappable: typing.Optional[bool] = OMIT,
|
|
427
|
+
server_version: typing.Optional[str] = OMIT,
|
|
428
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
429
|
+
) -> AsyncHttpResponse[ContainerImageRead]:
|
|
430
|
+
"""
|
|
431
|
+
Create a new Container Image.
|
|
432
|
+
|
|
433
|
+
Parameters
|
|
434
|
+
----------
|
|
435
|
+
name : str
|
|
436
|
+
|
|
437
|
+
packages : typing.Sequence[CodeExecutionPackageRequest]
|
|
438
|
+
|
|
439
|
+
tag : str
|
|
440
|
+
|
|
441
|
+
user_script : typing.Optional[str]
|
|
442
|
+
|
|
443
|
+
is_hotswappable : typing.Optional[bool]
|
|
444
|
+
|
|
445
|
+
server_version : typing.Optional[str]
|
|
446
|
+
|
|
447
|
+
request_options : typing.Optional[RequestOptions]
|
|
448
|
+
Request-specific configuration.
|
|
449
|
+
|
|
450
|
+
Returns
|
|
451
|
+
-------
|
|
452
|
+
AsyncHttpResponse[ContainerImageRead]
|
|
453
|
+
|
|
454
|
+
"""
|
|
455
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
456
|
+
"v1/container-images",
|
|
457
|
+
base_url=self._client_wrapper.get_environment().default,
|
|
458
|
+
method="POST",
|
|
459
|
+
json={
|
|
460
|
+
"name": name,
|
|
461
|
+
"packages": convert_and_respect_annotation_metadata(
|
|
462
|
+
object_=packages, annotation=typing.Sequence[CodeExecutionPackageRequest], direction="write"
|
|
463
|
+
),
|
|
464
|
+
"tag": tag,
|
|
465
|
+
"user_script": user_script,
|
|
466
|
+
"is_hotswappable": is_hotswappable,
|
|
467
|
+
"server_version": server_version,
|
|
468
|
+
},
|
|
469
|
+
headers={
|
|
470
|
+
"content-type": "application/json",
|
|
471
|
+
},
|
|
472
|
+
request_options=request_options,
|
|
473
|
+
omit=OMIT,
|
|
474
|
+
)
|
|
475
|
+
try:
|
|
476
|
+
if 200 <= _response.status_code < 300:
|
|
477
|
+
_data = typing.cast(
|
|
478
|
+
ContainerImageRead,
|
|
479
|
+
parse_obj_as(
|
|
480
|
+
type_=ContainerImageRead, # type: ignore
|
|
481
|
+
object_=_response.json(),
|
|
482
|
+
),
|
|
483
|
+
)
|
|
484
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
485
|
+
_response_json = _response.json()
|
|
486
|
+
except JSONDecodeError:
|
|
487
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
488
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
489
|
+
|
|
275
490
|
async def retrieve(
|
|
276
491
|
self, id: str, *, request_options: typing.Optional[RequestOptions] = None
|
|
277
492
|
) -> AsyncHttpResponse[ContainerImageRead]:
|
|
@@ -312,6 +527,77 @@ class AsyncRawContainerImagesClient:
|
|
|
312
527
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
313
528
|
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
314
529
|
|
|
530
|
+
async def update_container_image(
|
|
531
|
+
self,
|
|
532
|
+
id: str,
|
|
533
|
+
*,
|
|
534
|
+
packages: typing.Sequence[CodeExecutionPackageRequest],
|
|
535
|
+
tag: str,
|
|
536
|
+
user_script: typing.Optional[str] = OMIT,
|
|
537
|
+
is_hotswappable: typing.Optional[bool] = OMIT,
|
|
538
|
+
server_version: typing.Optional[str] = OMIT,
|
|
539
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
540
|
+
) -> AsyncHttpResponse[ContainerImageRead]:
|
|
541
|
+
"""
|
|
542
|
+
Update an existing Container Image.
|
|
543
|
+
|
|
544
|
+
Parameters
|
|
545
|
+
----------
|
|
546
|
+
id : str
|
|
547
|
+
A UUID string identifying this container image.
|
|
548
|
+
|
|
549
|
+
packages : typing.Sequence[CodeExecutionPackageRequest]
|
|
550
|
+
|
|
551
|
+
tag : str
|
|
552
|
+
|
|
553
|
+
user_script : typing.Optional[str]
|
|
554
|
+
|
|
555
|
+
is_hotswappable : typing.Optional[bool]
|
|
556
|
+
|
|
557
|
+
server_version : typing.Optional[str]
|
|
558
|
+
|
|
559
|
+
request_options : typing.Optional[RequestOptions]
|
|
560
|
+
Request-specific configuration.
|
|
561
|
+
|
|
562
|
+
Returns
|
|
563
|
+
-------
|
|
564
|
+
AsyncHttpResponse[ContainerImageRead]
|
|
565
|
+
|
|
566
|
+
"""
|
|
567
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
568
|
+
f"v1/container-images/{jsonable_encoder(id)}",
|
|
569
|
+
base_url=self._client_wrapper.get_environment().default,
|
|
570
|
+
method="PUT",
|
|
571
|
+
json={
|
|
572
|
+
"packages": convert_and_respect_annotation_metadata(
|
|
573
|
+
object_=packages, annotation=typing.Sequence[CodeExecutionPackageRequest], direction="write"
|
|
574
|
+
),
|
|
575
|
+
"tag": tag,
|
|
576
|
+
"user_script": user_script,
|
|
577
|
+
"is_hotswappable": is_hotswappable,
|
|
578
|
+
"server_version": server_version,
|
|
579
|
+
},
|
|
580
|
+
headers={
|
|
581
|
+
"content-type": "application/json",
|
|
582
|
+
},
|
|
583
|
+
request_options=request_options,
|
|
584
|
+
omit=OMIT,
|
|
585
|
+
)
|
|
586
|
+
try:
|
|
587
|
+
if 200 <= _response.status_code < 300:
|
|
588
|
+
_data = typing.cast(
|
|
589
|
+
ContainerImageRead,
|
|
590
|
+
parse_obj_as(
|
|
591
|
+
type_=ContainerImageRead, # type: ignore
|
|
592
|
+
object_=_response.json(),
|
|
593
|
+
),
|
|
594
|
+
)
|
|
595
|
+
return AsyncHttpResponse(response=_response, data=_data)
|
|
596
|
+
_response_json = _response.json()
|
|
597
|
+
except JSONDecodeError:
|
|
598
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
|
|
599
|
+
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
|
|
600
|
+
|
|
315
601
|
async def docker_service_token(
|
|
316
602
|
self, *, request_options: typing.Optional[RequestOptions] = None
|
|
317
603
|
) -> AsyncHttpResponse[DockerServiceToken]:
|