modal 0.73.148__py3-none-any.whl → 0.73.150__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
@@ -9346,6 +9346,135 @@ class VolumeMount(google.protobuf.message.Message):
9346
9346
 
9347
9347
  global___VolumeMount = VolumeMount
9348
9348
 
9349
+ class VolumePutFiles2Request(google.protobuf.message.Message):
9350
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9351
+
9352
+ class File(google.protobuf.message.Message):
9353
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9354
+
9355
+ PATH_FIELD_NUMBER: builtins.int
9356
+ SIZE_FIELD_NUMBER: builtins.int
9357
+ BLOCKS_SHA256_FIELD_NUMBER: builtins.int
9358
+ path: builtins.str
9359
+ """Destination path of the file to be uploaded, including any parent dirs
9360
+ etc.; for example "foo/bar/baz.txt"
9361
+ """
9362
+ size: builtins.int
9363
+ """The total size of the file, in bytes."""
9364
+ @property
9365
+ def blocks_sha256(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.bytes]:
9366
+ """SHA-256 checksum of each 8MiB block of the file's contents, in binary
9367
+ (ie 32 raw bytes) format for compactness.
9368
+ """
9369
+ def __init__(
9370
+ self,
9371
+ *,
9372
+ path: builtins.str = ...,
9373
+ size: builtins.int = ...,
9374
+ blocks_sha256: collections.abc.Iterable[builtins.bytes] | None = ...,
9375
+ ) -> None: ...
9376
+ def ClearField(self, field_name: typing_extensions.Literal["blocks_sha256", b"blocks_sha256", "path", b"path", "size", b"size"]) -> None: ...
9377
+
9378
+ class NewBlock(google.protobuf.message.Message):
9379
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9380
+
9381
+ FILE_INDEX_FIELD_NUMBER: builtins.int
9382
+ BLOCK_INDEX_FIELD_NUMBER: builtins.int
9383
+ PUT_RESPONSE_FIELD_NUMBER: builtins.int
9384
+ file_index: builtins.int
9385
+ """Index of the file in the `files` field."""
9386
+ block_index: builtins.int
9387
+ """The index of the block in `files[file_index].blocks_sha256`."""
9388
+ put_response: builtins.bytes
9389
+ """The raw bytes of the body that was returned from the HTTP PUT request
9390
+ when the client made a request for the `put_url` returned in the
9391
+ previous `VolumePutFiles2Response`.
9392
+ """
9393
+ def __init__(
9394
+ self,
9395
+ *,
9396
+ file_index: builtins.int = ...,
9397
+ block_index: builtins.int = ...,
9398
+ put_response: builtins.bytes = ...,
9399
+ ) -> None: ...
9400
+ def ClearField(self, field_name: typing_extensions.Literal["block_index", b"block_index", "file_index", b"file_index", "put_response", b"put_response"]) -> None: ...
9401
+
9402
+ FILES_FIELD_NUMBER: builtins.int
9403
+ NEW_BLOCKS_FIELD_NUMBER: builtins.int
9404
+ DISALLOW_OVERWRITE_EXISTING_FILES_FIELD_NUMBER: builtins.int
9405
+ @property
9406
+ def files(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VolumePutFiles2Request.File]:
9407
+ """List of files, sorted lexicographically by `path`."""
9408
+ @property
9409
+ def new_blocks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VolumePutFiles2Request.NewBlock]:
9410
+ """The last time the client called `VolumePutFiles2` for this file, it was
9411
+ told that some blocks were missing. This field contains information
9412
+ about the client having uploaded those missing blocks.
9413
+ """
9414
+ disallow_overwrite_existing_files: builtins.bool
9415
+ """If set to true, prevent overwriting existing files. (Note that we don't
9416
+ allow overwriting existing directories with uploaded files regardless.)
9417
+ """
9418
+ def __init__(
9419
+ self,
9420
+ *,
9421
+ files: collections.abc.Iterable[global___VolumePutFiles2Request.File] | None = ...,
9422
+ new_blocks: collections.abc.Iterable[global___VolumePutFiles2Request.NewBlock] | None = ...,
9423
+ disallow_overwrite_existing_files: builtins.bool = ...,
9424
+ ) -> None: ...
9425
+ 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: ...
9426
+
9427
+ global___VolumePutFiles2Request = VolumePutFiles2Request
9428
+
9429
+ class VolumePutFiles2Response(google.protobuf.message.Message):
9430
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9431
+
9432
+ class MissingBlock(google.protobuf.message.Message):
9433
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
9434
+
9435
+ FILE_INDEX_FIELD_NUMBER: builtins.int
9436
+ BLOCK_INDEX_FIELD_NUMBER: builtins.int
9437
+ PUT_URL_FIELD_NUMBER: builtins.int
9438
+ file_index: builtins.int
9439
+ """Index of the file in the original `files` field of the request."""
9440
+ block_index: builtins.int
9441
+ """The index of the block in the original
9442
+ `files[file_index].blocks_sha256`.
9443
+ """
9444
+ put_url: builtins.str
9445
+ """Make a HTTP PUT request to this endpoint with the blocks' contents as
9446
+ the body.
9447
+ """
9448
+ def __init__(
9449
+ self,
9450
+ *,
9451
+ file_index: builtins.int = ...,
9452
+ block_index: builtins.int = ...,
9453
+ put_url: builtins.str = ...,
9454
+ ) -> None: ...
9455
+ def ClearField(self, field_name: typing_extensions.Literal["block_index", b"block_index", "file_index", b"file_index", "put_url", b"put_url"]) -> None: ...
9456
+
9457
+ MISSING_BLOCKS_FIELD_NUMBER: builtins.int
9458
+ @property
9459
+ def missing_blocks(self) -> google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___VolumePutFiles2Response.MissingBlock]:
9460
+ """Blocks that are currently missing in the volume, because the file did not
9461
+ exist, or because the block checksum from `blocks_sha256` in the request
9462
+ did not match the current contents of the file.
9463
+
9464
+ Values will be returned sorted by `(file_index, block_index)`.
9465
+
9466
+ If this field is empty, it means that the files were uploaded successfully
9467
+ and/or that the request was an idempotent no-op.
9468
+ """
9469
+ def __init__(
9470
+ self,
9471
+ *,
9472
+ missing_blocks: collections.abc.Iterable[global___VolumePutFiles2Response.MissingBlock] | None = ...,
9473
+ ) -> None: ...
9474
+ def ClearField(self, field_name: typing_extensions.Literal["missing_blocks", b"missing_blocks"]) -> None: ...
9475
+
9476
+ global___VolumePutFiles2Response = VolumePutFiles2Response
9477
+
9349
9478
  class VolumePutFilesRequest(google.protobuf.message.Message):
9350
9479
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
9351
9480
 
@@ -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 = 148 # git: 7d05f36
4
+ build_number = 150 # git: e995145