modal 0.73.149__py3-none-any.whl → 0.73.151__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.
modal_proto/api_pb2.pyi CHANGED
@@ -3921,6 +3921,7 @@ class Function(google.protobuf.message.Message):
3921
3921
  CLOUD_PROVIDER_STR_FIELD_NUMBER: builtins.int
3922
3922
  _EXPERIMENTAL_ENABLE_GPU_SNAPSHOT_FIELD_NUMBER: builtins.int
3923
3923
  AUTOSCALER_SETTINGS_FIELD_NUMBER: builtins.int
3924
+ FUNCTION_SCHEMA_FIELD_NUMBER: builtins.int
3924
3925
  module_name: builtins.str
3925
3926
  function_name: builtins.str
3926
3927
  @property
@@ -4041,6 +4042,8 @@ class Function(google.protobuf.message.Message):
4041
4042
  @property
4042
4043
  def autoscaler_settings(self) -> global___AutoscalerSettings:
4043
4044
  """Bundle of parameters related to autoscaling"""
4045
+ @property
4046
+ def function_schema(self) -> global___FunctionSchema: ...
4044
4047
  def __init__(
4045
4048
  self,
4046
4049
  *,
@@ -4110,9 +4113,10 @@ class Function(google.protobuf.message.Message):
4110
4113
  cloud_provider_str: builtins.str = ...,
4111
4114
  _experimental_enable_gpu_snapshot: builtins.bool = ...,
4112
4115
  autoscaler_settings: global___AutoscalerSettings | None = ...,
4116
+ function_schema: global___FunctionSchema | None = ...,
4113
4117
  ) -> None: ...
4114
- def HasField(self, field_name: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip", "_cloud_provider", b"_cloud_provider", "_experimental_proxy_ip", b"_experimental_proxy_ip", "_proxy_id", b"_proxy_id", "_scheduler_placement", b"_scheduler_placement", "autoscaler_settings", b"autoscaler_settings", "checkpoint", b"checkpoint", "class_parameter_info", b"class_parameter_info", "cloud_provider", b"cloud_provider", "proxy_id", b"proxy_id", "pty_info", b"pty_info", "rate_limit", b"rate_limit", "resources", b"resources", "retry_policy", b"retry_policy", "schedule", b"schedule", "scheduler_placement", b"scheduler_placement", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> builtins.bool: ...
4115
- def ClearField(self, field_name: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip", "_cloud_provider", b"_cloud_provider", "_experimental_buffer_containers", b"_experimental_buffer_containers", "_experimental_concurrent_cancellations", b"_experimental_concurrent_cancellations", "_experimental_custom_scaling", b"_experimental_custom_scaling", "_experimental_enable_gpu_snapshot", b"_experimental_enable_gpu_snapshot", "_experimental_group_size", b"_experimental_group_size", "_experimental_proxy_ip", b"_experimental_proxy_ip", "_experimental_task_templates", b"_experimental_task_templates", "_experimental_task_templates_enabled", b"_experimental_task_templates_enabled", "_proxy_id", b"_proxy_id", "_scheduler_placement", b"_scheduler_placement", "app_name", b"app_name", "autoscaler_settings", b"autoscaler_settings", "batch_linger_ms", b"batch_linger_ms", "batch_max_size", b"batch_max_size", "block_network", b"block_network", "checkpoint", b"checkpoint", "checkpointing_enabled", b"checkpointing_enabled", "class_parameter_info", b"class_parameter_info", "class_serialized", b"class_serialized", "cloud_bucket_mounts", b"cloud_bucket_mounts", "cloud_provider", b"cloud_provider", "cloud_provider_str", b"cloud_provider_str", "concurrency_limit", b"concurrency_limit", "custom_domain_info", b"custom_domain_info", "definition_type", b"definition_type", "function_name", b"function_name", "function_serialized", b"function_serialized", "function_type", b"function_type", "i6pn_enabled", b"i6pn_enabled", "image_id", b"image_id", "is_auto_snapshot", b"is_auto_snapshot", "is_builder_function", b"is_builder_function", "is_checkpointing_function", b"is_checkpointing_function", "is_class", b"is_class", "is_method", b"is_method", "max_concurrent_inputs", b"max_concurrent_inputs", "max_inputs", b"max_inputs", "method_definitions", b"method_definitions", "method_definitions_set", b"method_definitions_set", "module_name", b"module_name", "mount_ids", b"mount_ids", "object_dependencies", b"object_dependencies", "proxy_id", b"proxy_id", "pty_info", b"pty_info", "rate_limit", b"rate_limit", "resources", b"resources", "retry_policy", b"retry_policy", "runtime", b"runtime", "runtime_debug", b"runtime_debug", "runtime_perf_record", b"runtime_perf_record", "s3_mounts", b"s3_mounts", "schedule", b"schedule", "scheduler_placement", b"scheduler_placement", "secret_ids", b"secret_ids", "shared_volume_mounts", b"shared_volume_mounts", "snapshot_debug", b"snapshot_debug", "target_concurrent_inputs", b"target_concurrent_inputs", "task_idle_timeout_secs", b"task_idle_timeout_secs", "timeout_secs", b"timeout_secs", "untrusted", b"untrusted", "use_function_id", b"use_function_id", "use_method_name", b"use_method_name", "volume_mounts", b"volume_mounts", "warm_pool_size", b"warm_pool_size", "web_url", b"web_url", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config", "worker_id", b"worker_id"]) -> None: ...
4118
+ def HasField(self, field_name: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip", "_cloud_provider", b"_cloud_provider", "_experimental_proxy_ip", b"_experimental_proxy_ip", "_proxy_id", b"_proxy_id", "_scheduler_placement", b"_scheduler_placement", "autoscaler_settings", b"autoscaler_settings", "checkpoint", b"checkpoint", "class_parameter_info", b"class_parameter_info", "cloud_provider", b"cloud_provider", "function_schema", b"function_schema", "proxy_id", b"proxy_id", "pty_info", b"pty_info", "rate_limit", b"rate_limit", "resources", b"resources", "retry_policy", b"retry_policy", "schedule", b"schedule", "scheduler_placement", b"scheduler_placement", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> builtins.bool: ...
4119
+ def ClearField(self, field_name: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip", "_cloud_provider", b"_cloud_provider", "_experimental_buffer_containers", b"_experimental_buffer_containers", "_experimental_concurrent_cancellations", b"_experimental_concurrent_cancellations", "_experimental_custom_scaling", b"_experimental_custom_scaling", "_experimental_enable_gpu_snapshot", b"_experimental_enable_gpu_snapshot", "_experimental_group_size", b"_experimental_group_size", "_experimental_proxy_ip", b"_experimental_proxy_ip", "_experimental_task_templates", b"_experimental_task_templates", "_experimental_task_templates_enabled", b"_experimental_task_templates_enabled", "_proxy_id", b"_proxy_id", "_scheduler_placement", b"_scheduler_placement", "app_name", b"app_name", "autoscaler_settings", b"autoscaler_settings", "batch_linger_ms", b"batch_linger_ms", "batch_max_size", b"batch_max_size", "block_network", b"block_network", "checkpoint", b"checkpoint", "checkpointing_enabled", b"checkpointing_enabled", "class_parameter_info", b"class_parameter_info", "class_serialized", b"class_serialized", "cloud_bucket_mounts", b"cloud_bucket_mounts", "cloud_provider", b"cloud_provider", "cloud_provider_str", b"cloud_provider_str", "concurrency_limit", b"concurrency_limit", "custom_domain_info", b"custom_domain_info", "definition_type", b"definition_type", "function_name", b"function_name", "function_schema", b"function_schema", "function_serialized", b"function_serialized", "function_type", b"function_type", "i6pn_enabled", b"i6pn_enabled", "image_id", b"image_id", "is_auto_snapshot", b"is_auto_snapshot", "is_builder_function", b"is_builder_function", "is_checkpointing_function", b"is_checkpointing_function", "is_class", b"is_class", "is_method", b"is_method", "max_concurrent_inputs", b"max_concurrent_inputs", "max_inputs", b"max_inputs", "method_definitions", b"method_definitions", "method_definitions_set", b"method_definitions_set", "module_name", b"module_name", "mount_ids", b"mount_ids", "object_dependencies", b"object_dependencies", "proxy_id", b"proxy_id", "pty_info", b"pty_info", "rate_limit", b"rate_limit", "resources", b"resources", "retry_policy", b"retry_policy", "runtime", b"runtime", "runtime_debug", b"runtime_debug", "runtime_perf_record", b"runtime_perf_record", "s3_mounts", b"s3_mounts", "schedule", b"schedule", "scheduler_placement", b"scheduler_placement", "secret_ids", b"secret_ids", "shared_volume_mounts", b"shared_volume_mounts", "snapshot_debug", b"snapshot_debug", "target_concurrent_inputs", b"target_concurrent_inputs", "task_idle_timeout_secs", b"task_idle_timeout_secs", "timeout_secs", b"timeout_secs", "untrusted", b"untrusted", "use_function_id", b"use_function_id", "use_method_name", b"use_method_name", "volume_mounts", b"volume_mounts", "warm_pool_size", b"warm_pool_size", "web_url", b"web_url", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config", "worker_id", b"worker_id"]) -> None: ...
4116
4120
  @typing.overload
4117
4121
  def WhichOneof(self, oneof_group: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip"]) -> typing_extensions.Literal["_experimental_proxy_ip"] | None: ...
4118
4122
  @typing.overload
@@ -4496,6 +4500,7 @@ class FunctionData(google.protobuf.message.Message):
4496
4500
  SNAPSHOT_DEBUG_FIELD_NUMBER: builtins.int
4497
4501
  RUNTIME_PERF_RECORD_FIELD_NUMBER: builtins.int
4498
4502
  AUTOSCALER_SETTINGS_FIELD_NUMBER: builtins.int
4503
+ FUNCTION_SCHEMA_FIELD_NUMBER: builtins.int
4499
4504
  module_name: builtins.str
4500
4505
  function_name: builtins.str
4501
4506
  function_type: global___Function.FunctionType.ValueType
@@ -4550,6 +4555,8 @@ class FunctionData(google.protobuf.message.Message):
4550
4555
  @property
4551
4556
  def autoscaler_settings(self) -> global___AutoscalerSettings:
4552
4557
  """Bundle of parameters related to autoscaling"""
4558
+ @property
4559
+ def function_schema(self) -> global___FunctionSchema: ...
4553
4560
  def __init__(
4554
4561
  self,
4555
4562
  *,
@@ -4583,9 +4590,10 @@ class FunctionData(google.protobuf.message.Message):
4583
4590
  snapshot_debug: builtins.bool = ...,
4584
4591
  runtime_perf_record: builtins.bool = ...,
4585
4592
  autoscaler_settings: global___AutoscalerSettings | None = ...,
4593
+ function_schema: global___FunctionSchema | None = ...,
4586
4594
  ) -> None: ...
4587
- def HasField(self, field_name: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip", "_experimental_proxy_ip", b"_experimental_proxy_ip", "autoscaler_settings", b"autoscaler_settings", "class_parameter_info", b"class_parameter_info", "schedule", b"schedule", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> builtins.bool: ...
4588
- def ClearField(self, field_name: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip", "_experimental_buffer_containers", b"_experimental_buffer_containers", "_experimental_custom_scaling", b"_experimental_custom_scaling", "_experimental_enable_gpu_snapshot", b"_experimental_enable_gpu_snapshot", "_experimental_group_size", b"_experimental_group_size", "_experimental_proxy_ip", b"_experimental_proxy_ip", "autoscaler_settings", b"autoscaler_settings", "class_parameter_info", b"class_parameter_info", "concurrency_limit", b"concurrency_limit", "custom_domain_info", b"custom_domain_info", "function_name", b"function_name", "function_type", b"function_type", "is_class", b"is_class", "is_method", b"is_method", "method_definitions", b"method_definitions", "method_definitions_set", b"method_definitions_set", "module_name", b"module_name", "ranked_functions", b"ranked_functions", "runtime_perf_record", b"runtime_perf_record", "schedule", b"schedule", "snapshot_debug", b"snapshot_debug", "task_idle_timeout_secs", b"task_idle_timeout_secs", "timeout_secs", b"timeout_secs", "untrusted", b"untrusted", "use_function_id", b"use_function_id", "use_method_name", b"use_method_name", "warm_pool_size", b"warm_pool_size", "web_url", b"web_url", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config", "worker_id", b"worker_id"]) -> None: ...
4595
+ def HasField(self, field_name: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip", "_experimental_proxy_ip", b"_experimental_proxy_ip", "autoscaler_settings", b"autoscaler_settings", "class_parameter_info", b"class_parameter_info", "function_schema", b"function_schema", "schedule", b"schedule", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> builtins.bool: ...
4596
+ def ClearField(self, field_name: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip", "_experimental_buffer_containers", b"_experimental_buffer_containers", "_experimental_custom_scaling", b"_experimental_custom_scaling", "_experimental_enable_gpu_snapshot", b"_experimental_enable_gpu_snapshot", "_experimental_group_size", b"_experimental_group_size", "_experimental_proxy_ip", b"_experimental_proxy_ip", "autoscaler_settings", b"autoscaler_settings", "class_parameter_info", b"class_parameter_info", "concurrency_limit", b"concurrency_limit", "custom_domain_info", b"custom_domain_info", "function_name", b"function_name", "function_schema", b"function_schema", "function_type", b"function_type", "is_class", b"is_class", "is_method", b"is_method", "method_definitions", b"method_definitions", "method_definitions_set", b"method_definitions_set", "module_name", b"module_name", "ranked_functions", b"ranked_functions", "runtime_perf_record", b"runtime_perf_record", "schedule", b"schedule", "snapshot_debug", b"snapshot_debug", "task_idle_timeout_secs", b"task_idle_timeout_secs", "timeout_secs", b"timeout_secs", "untrusted", b"untrusted", "use_function_id", b"use_function_id", "use_method_name", b"use_method_name", "warm_pool_size", b"warm_pool_size", "web_url", b"web_url", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config", "worker_id", b"worker_id"]) -> None: ...
4589
4597
  def WhichOneof(self, oneof_group: typing_extensions.Literal["X_experimental_proxy_ip", b"X_experimental_proxy_ip"]) -> typing_extensions.Literal["_experimental_proxy_ip"] | None: ...
4590
4598
 
4591
4599
  global___FunctionData = FunctionData
@@ -4992,6 +5000,7 @@ class FunctionHandleMetadata(google.protobuf.message.Message):
4992
5000
  DEFINITION_ID_FIELD_NUMBER: builtins.int
4993
5001
  CLASS_PARAMETER_INFO_FIELD_NUMBER: builtins.int
4994
5002
  METHOD_HANDLE_METADATA_FIELD_NUMBER: builtins.int
5003
+ FUNCTION_SCHEMA_FIELD_NUMBER: builtins.int
4995
5004
  function_name: builtins.str
4996
5005
  """Should be a subset and use IDs/types from `Function` above"""
4997
5006
  function_type: global___Function.FunctionType.ValueType
@@ -5007,6 +5016,8 @@ class FunctionHandleMetadata(google.protobuf.message.Message):
5007
5016
  @property
5008
5017
  def method_handle_metadata(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___FunctionHandleMetadata]:
5009
5018
  """Mapping of method names to their metadata, only non-empty for class service functions"""
5019
+ @property
5020
+ def function_schema(self) -> global___FunctionSchema: ...
5010
5021
  def __init__(
5011
5022
  self,
5012
5023
  *,
@@ -5019,9 +5030,10 @@ class FunctionHandleMetadata(google.protobuf.message.Message):
5019
5030
  definition_id: builtins.str = ...,
5020
5031
  class_parameter_info: global___ClassParameterInfo | None = ...,
5021
5032
  method_handle_metadata: collections.abc.Mapping[builtins.str, global___FunctionHandleMetadata] | None = ...,
5033
+ function_schema: global___FunctionSchema | None = ...,
5022
5034
  ) -> None: ...
5023
- def HasField(self, field_name: typing_extensions.Literal["class_parameter_info", b"class_parameter_info"]) -> builtins.bool: ...
5024
- def ClearField(self, field_name: typing_extensions.Literal["class_parameter_info", b"class_parameter_info", "definition_id", b"definition_id", "function_name", b"function_name", "function_type", b"function_type", "is_method", b"is_method", "method_handle_metadata", b"method_handle_metadata", "use_function_id", b"use_function_id", "use_method_name", b"use_method_name", "web_url", b"web_url"]) -> None: ...
5035
+ def HasField(self, field_name: typing_extensions.Literal["class_parameter_info", b"class_parameter_info", "function_schema", b"function_schema"]) -> builtins.bool: ...
5036
+ def ClearField(self, field_name: typing_extensions.Literal["class_parameter_info", b"class_parameter_info", "definition_id", b"definition_id", "function_name", b"function_name", "function_schema", b"function_schema", "function_type", b"function_type", "is_method", b"is_method", "method_handle_metadata", b"method_handle_metadata", "use_function_id", b"use_function_id", "use_method_name", b"use_method_name", "web_url", b"web_url"]) -> None: ...
5025
5037
 
5026
5038
  global___FunctionHandleMetadata = FunctionHandleMetadata
5027
5039
 
@@ -5216,6 +5228,7 @@ class FunctionPrecreateRequest(google.protobuf.message.Message):
5216
5228
  USE_FUNCTION_ID_FIELD_NUMBER: builtins.int
5217
5229
  USE_METHOD_NAME_FIELD_NUMBER: builtins.int
5218
5230
  METHOD_DEFINITIONS_FIELD_NUMBER: builtins.int
5231
+ FUNCTION_SCHEMA_FIELD_NUMBER: builtins.int
5219
5232
  app_id: builtins.str
5220
5233
  function_name: builtins.str
5221
5234
  existing_function_id: builtins.str
@@ -5229,6 +5242,8 @@ class FunctionPrecreateRequest(google.protobuf.message.Message):
5229
5242
  @property
5230
5243
  def method_definitions(self) -> google.protobuf.internal.containers.MessageMap[builtins.str, global___MethodDefinition]:
5231
5244
  """Mapping of method names to method definitions, only non-empty for class service functions"""
5245
+ @property
5246
+ def function_schema(self) -> global___FunctionSchema: ...
5232
5247
  def __init__(
5233
5248
  self,
5234
5249
  *,
@@ -5240,9 +5255,10 @@ class FunctionPrecreateRequest(google.protobuf.message.Message):
5240
5255
  use_function_id: builtins.str = ...,
5241
5256
  use_method_name: builtins.str = ...,
5242
5257
  method_definitions: collections.abc.Mapping[builtins.str, global___MethodDefinition] | None = ...,
5258
+ function_schema: global___FunctionSchema | None = ...,
5243
5259
  ) -> None: ...
5244
- def HasField(self, field_name: typing_extensions.Literal["webhook_config", b"webhook_config"]) -> builtins.bool: ...
5245
- def ClearField(self, field_name: typing_extensions.Literal["app_id", b"app_id", "existing_function_id", b"existing_function_id", "function_name", b"function_name", "function_type", b"function_type", "method_definitions", b"method_definitions", "use_function_id", b"use_function_id", "use_method_name", b"use_method_name", "webhook_config", b"webhook_config"]) -> None: ...
5260
+ def HasField(self, field_name: typing_extensions.Literal["function_schema", b"function_schema", "webhook_config", b"webhook_config"]) -> builtins.bool: ...
5261
+ def ClearField(self, field_name: typing_extensions.Literal["app_id", b"app_id", "existing_function_id", b"existing_function_id", "function_name", b"function_name", "function_schema", b"function_schema", "function_type", b"function_type", "method_definitions", b"method_definitions", "use_function_id", b"use_function_id", "use_method_name", b"use_method_name", "webhook_config", b"webhook_config"]) -> None: ...
5246
5262
 
5247
5263
  global___FunctionPrecreateRequest = FunctionPrecreateRequest
5248
5264
 
@@ -5470,6 +5486,43 @@ class FunctionRetryPolicy(google.protobuf.message.Message):
5470
5486
 
5471
5487
  global___FunctionRetryPolicy = FunctionRetryPolicy
5472
5488
 
5489
+ class FunctionSchema(google.protobuf.message.Message):
5490
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
5491
+
5492
+ class _FunctionSchemaType:
5493
+ ValueType = typing.NewType("ValueType", builtins.int)
5494
+ V: typing_extensions.TypeAlias = ValueType
5495
+
5496
+ class _FunctionSchemaTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[FunctionSchema._FunctionSchemaType.ValueType], builtins.type): # noqa: F821
5497
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
5498
+ FUNCTION_SCHEMA_UNSPECIFIED: FunctionSchema._FunctionSchemaType.ValueType # 0
5499
+ FUNCTION_SCHEMA_V1: FunctionSchema._FunctionSchemaType.ValueType # 1
5500
+
5501
+ class FunctionSchemaType(_FunctionSchemaType, metaclass=_FunctionSchemaTypeEnumTypeWrapper): ...
5502
+ FUNCTION_SCHEMA_UNSPECIFIED: FunctionSchema.FunctionSchemaType.ValueType # 0
5503
+ FUNCTION_SCHEMA_V1: FunctionSchema.FunctionSchemaType.ValueType # 1
5504
+
5505
+ SCHEMA_TYPE_FIELD_NUMBER: builtins.int
5506
+ ARGUMENTS_FIELD_NUMBER: builtins.int
5507
+ RETURN_TYPE_FIELD_NUMBER: builtins.int
5508
+ schema_type: global___FunctionSchema.FunctionSchemaType.ValueType
5509
+ """allows easy disambiguation between empty schema and no schema collection etc."""
5510
+ @property
5511
+ def arguments(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___ClassParameterSpec]: ...
5512
+ @property
5513
+ def return_type(self) -> global___GenericPayloadType: ...
5514
+ def __init__(
5515
+ self,
5516
+ *,
5517
+ schema_type: global___FunctionSchema.FunctionSchemaType.ValueType = ...,
5518
+ arguments: collections.abc.Iterable[global___ClassParameterSpec] | None = ...,
5519
+ return_type: global___GenericPayloadType | None = ...,
5520
+ ) -> None: ...
5521
+ def HasField(self, field_name: typing_extensions.Literal["return_type", b"return_type"]) -> builtins.bool: ...
5522
+ def ClearField(self, field_name: typing_extensions.Literal["arguments", b"arguments", "return_type", b"return_type", "schema_type", b"schema_type"]) -> None: ...
5523
+
5524
+ global___FunctionSchema = FunctionSchema
5525
+
5473
5526
  class FunctionStats(google.protobuf.message.Message):
5474
5527
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
5475
5528
 
@@ -6039,6 +6092,7 @@ class MethodDefinition(google.protobuf.message.Message):
6039
6092
  WEB_URL_FIELD_NUMBER: builtins.int
6040
6093
  WEB_URL_INFO_FIELD_NUMBER: builtins.int
6041
6094
  CUSTOM_DOMAIN_INFO_FIELD_NUMBER: builtins.int
6095
+ FUNCTION_SCHEMA_FIELD_NUMBER: builtins.int
6042
6096
  function_name: builtins.str
6043
6097
  function_type: global___Function.FunctionType.ValueType
6044
6098
  @property
@@ -6048,6 +6102,8 @@ class MethodDefinition(google.protobuf.message.Message):
6048
6102
  def web_url_info(self) -> global___WebUrlInfo: ...
6049
6103
  @property
6050
6104
  def custom_domain_info(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CustomDomainInfo]: ...
6105
+ @property
6106
+ def function_schema(self) -> global___FunctionSchema: ...
6051
6107
  def __init__(
6052
6108
  self,
6053
6109
  *,
@@ -6057,9 +6113,10 @@ class MethodDefinition(google.protobuf.message.Message):
6057
6113
  web_url: builtins.str = ...,
6058
6114
  web_url_info: global___WebUrlInfo | None = ...,
6059
6115
  custom_domain_info: collections.abc.Iterable[global___CustomDomainInfo] | None = ...,
6116
+ function_schema: global___FunctionSchema | None = ...,
6060
6117
  ) -> None: ...
6061
- def HasField(self, field_name: typing_extensions.Literal["web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> builtins.bool: ...
6062
- def ClearField(self, field_name: typing_extensions.Literal["custom_domain_info", b"custom_domain_info", "function_name", b"function_name", "function_type", b"function_type", "web_url", b"web_url", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> None: ...
6118
+ def HasField(self, field_name: typing_extensions.Literal["function_schema", b"function_schema", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> builtins.bool: ...
6119
+ def ClearField(self, field_name: typing_extensions.Literal["custom_domain_info", b"custom_domain_info", "function_name", b"function_name", "function_schema", b"function_schema", "function_type", b"function_type", "web_url", b"web_url", "web_url_info", b"web_url_info", "webhook_config", b"webhook_config"]) -> None: ...
6063
6120
 
6064
6121
  global___MethodDefinition = MethodDefinition
6065
6122
 
@@ -9346,6 +9403,135 @@ class VolumeMount(google.protobuf.message.Message):
9346
9403
 
9347
9404
  global___VolumeMount = VolumeMount
9348
9405
 
9406
+ class VolumePutFiles2Request(google.protobuf.message.Message):
9407
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9408
+
9409
+ class File(google.protobuf.message.Message):
9410
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9411
+
9412
+ PATH_FIELD_NUMBER: builtins.int
9413
+ SIZE_FIELD_NUMBER: builtins.int
9414
+ BLOCKS_SHA256_FIELD_NUMBER: builtins.int
9415
+ path: builtins.str
9416
+ """Destination path of the file to be uploaded, including any parent dirs
9417
+ etc.; for example "foo/bar/baz.txt"
9418
+ """
9419
+ size: builtins.int
9420
+ """The total size of the file, in bytes."""
9421
+ @property
9422
+ def blocks_sha256(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
9423
+ """SHA-256 checksum of each 8MiB block of the file's contents, in binary
9424
+ (ie 32 raw bytes) format for compactness.
9425
+ """
9426
+ def __init__(
9427
+ self,
9428
+ *,
9429
+ path: builtins.str = ...,
9430
+ size: builtins.int = ...,
9431
+ blocks_sha256: collections.abc.Iterable[builtins.bytes] | None = ...,
9432
+ ) -> None: ...
9433
+ def ClearField(self, field_name: typing_extensions.Literal["blocks_sha256", b"blocks_sha256", "path", b"path", "size", b"size"]) -> None: ...
9434
+
9435
+ class NewBlock(google.protobuf.message.Message):
9436
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9437
+
9438
+ FILE_INDEX_FIELD_NUMBER: builtins.int
9439
+ BLOCK_INDEX_FIELD_NUMBER: builtins.int
9440
+ PUT_RESPONSE_FIELD_NUMBER: builtins.int
9441
+ file_index: builtins.int
9442
+ """Index of the file in the `files` field."""
9443
+ block_index: builtins.int
9444
+ """The index of the block in `files[file_index].blocks_sha256`."""
9445
+ put_response: builtins.bytes
9446
+ """The raw bytes of the body that was returned from the HTTP PUT request
9447
+ when the client made a request for the `put_url` returned in the
9448
+ previous `VolumePutFiles2Response`.
9449
+ """
9450
+ def __init__(
9451
+ self,
9452
+ *,
9453
+ file_index: builtins.int = ...,
9454
+ block_index: builtins.int = ...,
9455
+ put_response: builtins.bytes = ...,
9456
+ ) -> None: ...
9457
+ def ClearField(self, field_name: typing_extensions.Literal["block_index", b"block_index", "file_index", b"file_index", "put_response", b"put_response"]) -> None: ...
9458
+
9459
+ FILES_FIELD_NUMBER: builtins.int
9460
+ NEW_BLOCKS_FIELD_NUMBER: builtins.int
9461
+ DISALLOW_OVERWRITE_EXISTING_FILES_FIELD_NUMBER: builtins.int
9462
+ @property
9463
+ def files(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VolumePutFiles2Request.File]:
9464
+ """List of files, sorted lexicographically by `path`."""
9465
+ @property
9466
+ def new_blocks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VolumePutFiles2Request.NewBlock]:
9467
+ """The last time the client called `VolumePutFiles2` for this file, it was
9468
+ told that some blocks were missing. This field contains information
9469
+ about the client having uploaded those missing blocks.
9470
+ """
9471
+ disallow_overwrite_existing_files: builtins.bool
9472
+ """If set to true, prevent overwriting existing files. (Note that we don't
9473
+ allow overwriting existing directories with uploaded files regardless.)
9474
+ """
9475
+ def __init__(
9476
+ self,
9477
+ *,
9478
+ files: collections.abc.Iterable[global___VolumePutFiles2Request.File] | None = ...,
9479
+ new_blocks: collections.abc.Iterable[global___VolumePutFiles2Request.NewBlock] | None = ...,
9480
+ disallow_overwrite_existing_files: builtins.bool = ...,
9481
+ ) -> None: ...
9482
+ def ClearField(self, field_name: typing_extensions.Literal["disallow_overwrite_existing_files", b"disallow_overwrite_existing_files", "files", b"files", "new_blocks", b"new_blocks"]) -> None: ...
9483
+
9484
+ global___VolumePutFiles2Request = VolumePutFiles2Request
9485
+
9486
+ class VolumePutFiles2Response(google.protobuf.message.Message):
9487
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9488
+
9489
+ class MissingBlock(google.protobuf.message.Message):
9490
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9491
+
9492
+ FILE_INDEX_FIELD_NUMBER: builtins.int
9493
+ BLOCK_INDEX_FIELD_NUMBER: builtins.int
9494
+ PUT_URL_FIELD_NUMBER: builtins.int
9495
+ file_index: builtins.int
9496
+ """Index of the file in the original `files` field of the request."""
9497
+ block_index: builtins.int
9498
+ """The index of the block in the original
9499
+ `files[file_index].blocks_sha256`.
9500
+ """
9501
+ put_url: builtins.str
9502
+ """Make a HTTP PUT request to this endpoint with the blocks' contents as
9503
+ the body.
9504
+ """
9505
+ def __init__(
9506
+ self,
9507
+ *,
9508
+ file_index: builtins.int = ...,
9509
+ block_index: builtins.int = ...,
9510
+ put_url: builtins.str = ...,
9511
+ ) -> None: ...
9512
+ def ClearField(self, field_name: typing_extensions.Literal["block_index", b"block_index", "file_index", b"file_index", "put_url", b"put_url"]) -> None: ...
9513
+
9514
+ MISSING_BLOCKS_FIELD_NUMBER: builtins.int
9515
+ @property
9516
+ def missing_blocks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VolumePutFiles2Response.MissingBlock]:
9517
+ """Blocks that are currently missing in the volume, because the file did not
9518
+ exist, or because the block checksum from `blocks_sha256` in the request
9519
+ did not match the current contents of the file.
9520
+
9521
+ Values will be returned sorted by `(file_index, block_index)`.
9522
+
9523
+ If this field is empty, it means that the files were uploaded successfully
9524
+ and/or that the request was an idempotent no-op.
9525
+ """
9526
+ def __init__(
9527
+ self,
9528
+ *,
9529
+ missing_blocks: collections.abc.Iterable[global___VolumePutFiles2Response.MissingBlock] | None = ...,
9530
+ ) -> None: ...
9531
+ def ClearField(self, field_name: typing_extensions.Literal["missing_blocks", b"missing_blocks"]) -> None: ...
9532
+
9533
+ global___VolumePutFiles2Response = VolumePutFiles2Response
9534
+
9349
9535
  class VolumePutFilesRequest(google.protobuf.message.Message):
9350
9536
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
9351
9537
 
@@ -710,6 +710,11 @@ class ModalClientStub(object):
710
710
  request_serializer=modal__proto_dot_api__pb2.VolumePutFilesRequest.SerializeToString,
711
711
  response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
712
712
  )
713
+ self.VolumePutFiles2 = channel.unary_unary(
714
+ '/modal.client.ModalClient/VolumePutFiles2',
715
+ request_serializer=modal__proto_dot_api__pb2.VolumePutFiles2Request.SerializeToString,
716
+ response_deserializer=modal__proto_dot_api__pb2.VolumePutFiles2Response.FromString,
717
+ )
713
718
  self.VolumeReload = channel.unary_unary(
714
719
  '/modal.client.ModalClient/VolumeReload',
715
720
  request_serializer=modal__proto_dot_api__pb2.VolumeReloadRequest.SerializeToString,
@@ -1594,6 +1599,12 @@ class ModalClientServicer(object):
1594
1599
  context.set_details('Method not implemented!')
1595
1600
  raise NotImplementedError('Method not implemented!')
1596
1601
 
1602
+ def VolumePutFiles2(self, request, context):
1603
+ """Missing associated documentation comment in .proto file."""
1604
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1605
+ context.set_details('Method not implemented!')
1606
+ raise NotImplementedError('Method not implemented!')
1607
+
1597
1608
  def VolumeReload(self, request, context):
1598
1609
  """Missing associated documentation comment in .proto file."""
1599
1610
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
@@ -2317,6 +2328,11 @@ def add_ModalClientServicer_to_server(servicer, server):
2317
2328
  request_deserializer=modal__proto_dot_api__pb2.VolumePutFilesRequest.FromString,
2318
2329
  response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
2319
2330
  ),
2331
+ 'VolumePutFiles2': grpc.unary_unary_rpc_method_handler(
2332
+ servicer.VolumePutFiles2,
2333
+ request_deserializer=modal__proto_dot_api__pb2.VolumePutFiles2Request.FromString,
2334
+ response_serializer=modal__proto_dot_api__pb2.VolumePutFiles2Response.SerializeToString,
2335
+ ),
2320
2336
  'VolumeReload': grpc.unary_unary_rpc_method_handler(
2321
2337
  servicer.VolumeReload,
2322
2338
  request_deserializer=modal__proto_dot_api__pb2.VolumeReloadRequest.FromString,
@@ -4710,6 +4726,23 @@ class ModalClient(object):
4710
4726
  options, channel_credentials,
4711
4727
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
4712
4728
 
4729
+ @staticmethod
4730
+ def VolumePutFiles2(request,
4731
+ target,
4732
+ options=(),
4733
+ channel_credentials=None,
4734
+ call_credentials=None,
4735
+ insecure=False,
4736
+ compression=None,
4737
+ wait_for_ready=None,
4738
+ timeout=None,
4739
+ metadata=None):
4740
+ return grpc.experimental.unary_unary(request, target, '/modal.client.ModalClient/VolumePutFiles2',
4741
+ modal__proto_dot_api__pb2.VolumePutFiles2Request.SerializeToString,
4742
+ modal__proto_dot_api__pb2.VolumePutFiles2Response.FromString,
4743
+ options, channel_credentials,
4744
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
4745
+
4713
4746
  @staticmethod
4714
4747
  def VolumeReload(request,
4715
4748
  target,
@@ -591,6 +591,10 @@ class ModalClientStub:
591
591
  modal_proto.api_pb2.VolumePutFilesRequest,
592
592
  google.protobuf.empty_pb2.Empty,
593
593
  ]
594
+ VolumePutFiles2: grpc.UnaryUnaryMultiCallable[
595
+ modal_proto.api_pb2.VolumePutFiles2Request,
596
+ modal_proto.api_pb2.VolumePutFiles2Response,
597
+ ]
594
598
  VolumeReload: grpc.UnaryUnaryMultiCallable[
595
599
  modal_proto.api_pb2.VolumeReloadRequest,
596
600
  google.protobuf.empty_pb2.Empty,
@@ -1470,6 +1474,12 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
1470
1474
  context: grpc.ServicerContext,
1471
1475
  ) -> google.protobuf.empty_pb2.Empty: ...
1472
1476
  @abc.abstractmethod
1477
+ def VolumePutFiles2(
1478
+ self,
1479
+ request: modal_proto.api_pb2.VolumePutFiles2Request,
1480
+ context: grpc.ServicerContext,
1481
+ ) -> modal_proto.api_pb2.VolumePutFiles2Response: ...
1482
+ @abc.abstractmethod
1473
1483
  def VolumeReload(
1474
1484
  self,
1475
1485
  request: modal_proto.api_pb2.VolumeReloadRequest,
@@ -151,6 +151,7 @@ class ModalClientModal:
151
151
  self.VolumeList = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumeList, client)
152
152
  self.VolumeListFiles = modal.client.UnaryStreamWrapper(grpclib_stub.VolumeListFiles, client)
153
153
  self.VolumePutFiles = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumePutFiles, client)
154
+ self.VolumePutFiles2 = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumePutFiles2, client)
154
155
  self.VolumeReload = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumeReload, client)
155
156
  self.VolumeRemoveFile = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumeRemoveFile, client)
156
157
  self.VolumeRename = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumeRename, client)
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
 
3
3
  # Note: Reset this value to -1 whenever you make a minor `0.X` release of the client.
4
- build_number = 149 # git: b3137a7
4
+ build_number = 151 # git: 9283391