modal 1.2.2.dev22__py3-none-any.whl → 1.2.2.dev31__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.
Files changed (52) hide show
  1. modal/_functions.py +69 -37
  2. modal/_grpc_client.py +25 -2
  3. modal/_load_context.py +105 -0
  4. modal/_object.py +47 -18
  5. modal/_resolver.py +21 -35
  6. modal/_utils/function_utils.py +1 -2
  7. modal/app.py +7 -0
  8. modal/app.pyi +3 -0
  9. modal/cli/dict.py +5 -2
  10. modal/cli/queues.py +4 -2
  11. modal/client.pyi +2 -2
  12. modal/cloud_bucket_mount.py +2 -0
  13. modal/cloud_bucket_mount.pyi +4 -0
  14. modal/cls.py +71 -32
  15. modal/cls.pyi +3 -0
  16. modal/dict.py +14 -5
  17. modal/dict.pyi +2 -0
  18. modal/environments.py +16 -7
  19. modal/environments.pyi +6 -2
  20. modal/experimental/flash.py +2 -3
  21. modal/functions.pyi +10 -3
  22. modal/image.py +25 -25
  23. modal/image.pyi +9 -9
  24. modal/mount.py +34 -24
  25. modal/mount.pyi +33 -7
  26. modal/network_file_system.py +14 -5
  27. modal/network_file_system.pyi +12 -2
  28. modal/object.pyi +35 -8
  29. modal/proxy.py +14 -6
  30. modal/proxy.pyi +10 -2
  31. modal/queue.py +14 -5
  32. modal/queue.pyi +12 -2
  33. modal/runner.py +54 -50
  34. modal/runner.pyi +4 -3
  35. modal/sandbox.py +21 -12
  36. modal/secret.py +34 -17
  37. modal/secret.pyi +12 -2
  38. modal/serving.py +7 -11
  39. modal/serving.pyi +7 -8
  40. modal/snapshot.py +11 -5
  41. modal/volume.py +25 -7
  42. modal/volume.pyi +2 -0
  43. {modal-1.2.2.dev22.dist-info → modal-1.2.2.dev31.dist-info}/METADATA +2 -2
  44. {modal-1.2.2.dev22.dist-info → modal-1.2.2.dev31.dist-info}/RECORD +52 -51
  45. modal_proto/api.proto +10 -0
  46. modal_proto/api_pb2.py +841 -838
  47. modal_proto/api_pb2.pyi +25 -2
  48. modal_version/__init__.py +1 -1
  49. {modal-1.2.2.dev22.dist-info → modal-1.2.2.dev31.dist-info}/WHEEL +0 -0
  50. {modal-1.2.2.dev22.dist-info → modal-1.2.2.dev31.dist-info}/entry_points.txt +0 -0
  51. {modal-1.2.2.dev22.dist-info → modal-1.2.2.dev31.dist-info}/licenses/LICENSE +0 -0
  52. {modal-1.2.2.dev22.dist-info → modal-1.2.2.dev31.dist-info}/top_level.txt +0 -0
modal_proto/api_pb2.pyi CHANGED
@@ -2746,6 +2746,21 @@ class CloudBucketMount(google.protobuf.message.Message):
2746
2746
  R2: CloudBucketMount.BucketType.ValueType # 2
2747
2747
  GCP: CloudBucketMount.BucketType.ValueType # 3
2748
2748
 
2749
+ class _MetadataTTLType:
2750
+ ValueType = typing.NewType("ValueType", builtins.int)
2751
+ V: typing_extensions.TypeAlias = ValueType
2752
+
2753
+ class _MetadataTTLTypeEnumTypeWrapper(google.protobuf.internal.enum_type_wrapper._EnumTypeWrapper[CloudBucketMount._MetadataTTLType.ValueType], builtins.type): # noqa: F821
2754
+ DESCRIPTOR: google.protobuf.descriptor.EnumDescriptor
2755
+ METADATA_TTL_TYPE_UNSPECIFIED: CloudBucketMount._MetadataTTLType.ValueType # 0
2756
+ METADATA_TTL_TYPE_MINIMAL: CloudBucketMount._MetadataTTLType.ValueType # 1
2757
+ METADATA_TTL_TYPE_INDEFINITE: CloudBucketMount._MetadataTTLType.ValueType # 2
2758
+
2759
+ class MetadataTTLType(_MetadataTTLType, metaclass=_MetadataTTLTypeEnumTypeWrapper): ...
2760
+ METADATA_TTL_TYPE_UNSPECIFIED: CloudBucketMount.MetadataTTLType.ValueType # 0
2761
+ METADATA_TTL_TYPE_MINIMAL: CloudBucketMount.MetadataTTLType.ValueType # 1
2762
+ METADATA_TTL_TYPE_INDEFINITE: CloudBucketMount.MetadataTTLType.ValueType # 2
2763
+
2749
2764
  BUCKET_NAME_FIELD_NUMBER: builtins.int
2750
2765
  MOUNT_PATH_FIELD_NUMBER: builtins.int
2751
2766
  CREDENTIALS_SECRET_ID_FIELD_NUMBER: builtins.int
@@ -2756,6 +2771,8 @@ class CloudBucketMount(google.protobuf.message.Message):
2756
2771
  KEY_PREFIX_FIELD_NUMBER: builtins.int
2757
2772
  OIDC_AUTH_ROLE_ARN_FIELD_NUMBER: builtins.int
2758
2773
  FORCE_PATH_STYLE_FIELD_NUMBER: builtins.int
2774
+ METADATA_TTL_TYPE_FIELD_NUMBER: builtins.int
2775
+ METADATA_TTL_SECONDS_FIELD_NUMBER: builtins.int
2759
2776
  bucket_name: builtins.str
2760
2777
  mount_path: builtins.str
2761
2778
  credentials_secret_id: builtins.str
@@ -2766,6 +2783,8 @@ class CloudBucketMount(google.protobuf.message.Message):
2766
2783
  key_prefix: builtins.str
2767
2784
  oidc_auth_role_arn: builtins.str
2768
2785
  force_path_style: builtins.bool
2786
+ metadata_ttl_type: global___CloudBucketMount.MetadataTTLType.ValueType
2787
+ metadata_ttl_seconds: builtins.int
2769
2788
  def __init__(
2770
2789
  self,
2771
2790
  *,
@@ -2779,15 +2798,19 @@ class CloudBucketMount(google.protobuf.message.Message):
2779
2798
  key_prefix: builtins.str | None = ...,
2780
2799
  oidc_auth_role_arn: builtins.str | None = ...,
2781
2800
  force_path_style: builtins.bool = ...,
2801
+ metadata_ttl_type: global___CloudBucketMount.MetadataTTLType.ValueType = ...,
2802
+ metadata_ttl_seconds: builtins.int = ...,
2782
2803
  ) -> None: ...
2783
- def HasField(self, field_name: typing_extensions.Literal["_bucket_endpoint_url", b"_bucket_endpoint_url", "_key_prefix", b"_key_prefix", "_oidc_auth_role_arn", b"_oidc_auth_role_arn", "bucket_endpoint_url", b"bucket_endpoint_url", "key_prefix", b"key_prefix", "oidc_auth_role_arn", b"oidc_auth_role_arn"]) -> builtins.bool: ...
2784
- def ClearField(self, field_name: typing_extensions.Literal["_bucket_endpoint_url", b"_bucket_endpoint_url", "_key_prefix", b"_key_prefix", "_oidc_auth_role_arn", b"_oidc_auth_role_arn", "bucket_endpoint_url", b"bucket_endpoint_url", "bucket_name", b"bucket_name", "bucket_type", b"bucket_type", "credentials_secret_id", b"credentials_secret_id", "force_path_style", b"force_path_style", "key_prefix", b"key_prefix", "mount_path", b"mount_path", "oidc_auth_role_arn", b"oidc_auth_role_arn", "read_only", b"read_only", "requester_pays", b"requester_pays"]) -> None: ...
2804
+ def HasField(self, field_name: typing_extensions.Literal["_bucket_endpoint_url", b"_bucket_endpoint_url", "_key_prefix", b"_key_prefix", "_oidc_auth_role_arn", b"_oidc_auth_role_arn", "bucket_endpoint_url", b"bucket_endpoint_url", "key_prefix", b"key_prefix", "metadata_ttl_oneof", b"metadata_ttl_oneof", "metadata_ttl_seconds", b"metadata_ttl_seconds", "metadata_ttl_type", b"metadata_ttl_type", "oidc_auth_role_arn", b"oidc_auth_role_arn"]) -> builtins.bool: ...
2805
+ def ClearField(self, field_name: typing_extensions.Literal["_bucket_endpoint_url", b"_bucket_endpoint_url", "_key_prefix", b"_key_prefix", "_oidc_auth_role_arn", b"_oidc_auth_role_arn", "bucket_endpoint_url", b"bucket_endpoint_url", "bucket_name", b"bucket_name", "bucket_type", b"bucket_type", "credentials_secret_id", b"credentials_secret_id", "force_path_style", b"force_path_style", "key_prefix", b"key_prefix", "metadata_ttl_oneof", b"metadata_ttl_oneof", "metadata_ttl_seconds", b"metadata_ttl_seconds", "metadata_ttl_type", b"metadata_ttl_type", "mount_path", b"mount_path", "oidc_auth_role_arn", b"oidc_auth_role_arn", "read_only", b"read_only", "requester_pays", b"requester_pays"]) -> None: ...
2785
2806
  @typing.overload
2786
2807
  def WhichOneof(self, oneof_group: typing_extensions.Literal["_bucket_endpoint_url", b"_bucket_endpoint_url"]) -> typing_extensions.Literal["bucket_endpoint_url"] | None: ...
2787
2808
  @typing.overload
2788
2809
  def WhichOneof(self, oneof_group: typing_extensions.Literal["_key_prefix", b"_key_prefix"]) -> typing_extensions.Literal["key_prefix"] | None: ...
2789
2810
  @typing.overload
2790
2811
  def WhichOneof(self, oneof_group: typing_extensions.Literal["_oidc_auth_role_arn", b"_oidc_auth_role_arn"]) -> typing_extensions.Literal["oidc_auth_role_arn"] | None: ...
2812
+ @typing.overload
2813
+ def WhichOneof(self, oneof_group: typing_extensions.Literal["metadata_ttl_oneof", b"metadata_ttl_oneof"]) -> typing_extensions.Literal["metadata_ttl_type", "metadata_ttl_seconds"] | None: ...
2791
2814
 
2792
2815
  global___CloudBucketMount = CloudBucketMount
2793
2816
 
modal_version/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
1
  # Copyright Modal Labs 2025
2
2
  """Supplies the current version of the modal client library."""
3
3
 
4
- __version__ = "1.2.2.dev22"
4
+ __version__ = "1.2.2.dev31"