modal 1.1.5.dev53__py3-none-any.whl → 1.1.5.dev54__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 modal might be problematic. Click here for more details.

modal_proto/api_pb2.pyi CHANGED
@@ -9,6 +9,7 @@ import google.protobuf.internal.containers
9
9
  import google.protobuf.internal.enum_type_wrapper
10
10
  import google.protobuf.message
11
11
  import google.protobuf.struct_pb2
12
+ import google.protobuf.timestamp_pb2
12
13
  import google.protobuf.wrappers_pb2
13
14
  import sys
14
15
  import typing
@@ -11511,6 +11512,82 @@ class WebhookConfig(google.protobuf.message.Message):
11511
11512
 
11512
11513
  global___WebhookConfig = WebhookConfig
11513
11514
 
11515
+ class WorkspaceBillingReportItem(google.protobuf.message.Message):
11516
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
11517
+
11518
+ class TagsEntry(google.protobuf.message.Message):
11519
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
11520
+
11521
+ KEY_FIELD_NUMBER: builtins.int
11522
+ VALUE_FIELD_NUMBER: builtins.int
11523
+ key: builtins.str
11524
+ value: builtins.str
11525
+ def __init__(
11526
+ self,
11527
+ *,
11528
+ key: builtins.str = ...,
11529
+ value: builtins.str = ...,
11530
+ ) -> None: ...
11531
+ def ClearField(self, field_name: typing_extensions.Literal["key", b"key", "value", b"value"]) -> None: ...
11532
+
11533
+ OBJECT_ID_FIELD_NUMBER: builtins.int
11534
+ DESCRIPTION_FIELD_NUMBER: builtins.int
11535
+ ENVIRONMENT_NAME_FIELD_NUMBER: builtins.int
11536
+ INTERVAL_FIELD_NUMBER: builtins.int
11537
+ COST_FIELD_NUMBER: builtins.int
11538
+ TAGS_FIELD_NUMBER: builtins.int
11539
+ object_id: builtins.str
11540
+ description: builtins.str
11541
+ environment_name: builtins.str
11542
+ @property
11543
+ def interval(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
11544
+ cost: builtins.str
11545
+ @property
11546
+ def tags(self) -> google.protobuf.internal.containers.ScalarMap[builtins.str, builtins.str]: ...
11547
+ def __init__(
11548
+ self,
11549
+ *,
11550
+ object_id: builtins.str = ...,
11551
+ description: builtins.str = ...,
11552
+ environment_name: builtins.str = ...,
11553
+ interval: google.protobuf.timestamp_pb2.Timestamp | None = ...,
11554
+ cost: builtins.str = ...,
11555
+ tags: collections.abc.Mapping[builtins.str, builtins.str] | None = ...,
11556
+ ) -> None: ...
11557
+ def HasField(self, field_name: typing_extensions.Literal["interval", b"interval"]) -> builtins.bool: ...
11558
+ def ClearField(self, field_name: typing_extensions.Literal["cost", b"cost", "description", b"description", "environment_name", b"environment_name", "interval", b"interval", "object_id", b"object_id", "tags", b"tags"]) -> None: ...
11559
+
11560
+ global___WorkspaceBillingReportItem = WorkspaceBillingReportItem
11561
+
11562
+ class WorkspaceBillingReportRequest(google.protobuf.message.Message):
11563
+ DESCRIPTOR: google.protobuf.descriptor.Descriptor
11564
+
11565
+ START_TIMESTAMP_FIELD_NUMBER: builtins.int
11566
+ END_TIMESTAMP_FIELD_NUMBER: builtins.int
11567
+ RESOLUTION_FIELD_NUMBER: builtins.int
11568
+ TAG_NAMES_FIELD_NUMBER: builtins.int
11569
+ @property
11570
+ def start_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp:
11571
+ """Workspace ID will be implicit in the request metadata"""
11572
+ @property
11573
+ def end_timestamp(self) -> google.protobuf.timestamp_pb2.Timestamp: ...
11574
+ resolution: builtins.str
11575
+ """e.g. 'd' or 'h'; server defines what we accept"""
11576
+ @property
11577
+ def tag_names(self) -> google.protobuf.internal.containers.RepeatedScalarFieldContainer[builtins.str]: ...
11578
+ def __init__(
11579
+ self,
11580
+ *,
11581
+ start_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
11582
+ end_timestamp: google.protobuf.timestamp_pb2.Timestamp | None = ...,
11583
+ resolution: builtins.str = ...,
11584
+ tag_names: collections.abc.Iterable[builtins.str] | None = ...,
11585
+ ) -> None: ...
11586
+ def HasField(self, field_name: typing_extensions.Literal["end_timestamp", b"end_timestamp", "start_timestamp", b"start_timestamp"]) -> builtins.bool: ...
11587
+ def ClearField(self, field_name: typing_extensions.Literal["end_timestamp", b"end_timestamp", "resolution", b"resolution", "start_timestamp", b"start_timestamp", "tag_names", b"tag_names"]) -> None: ...
11588
+
11589
+ global___WorkspaceBillingReportRequest = WorkspaceBillingReportRequest
11590
+
11514
11591
  class WorkspaceNameLookupResponse(google.protobuf.message.Message):
11515
11592
  DESCRIPTOR: google.protobuf.descriptor.Descriptor
11516
11593
 
@@ -870,6 +870,11 @@ class ModalClientStub(object):
870
870
  request_serializer=modal__proto_dot_api__pb2.VolumeRenameRequest.SerializeToString,
871
871
  response_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
872
872
  )
873
+ self.WorkspaceBillingReport = channel.unary_stream(
874
+ '/modal.client.ModalClient/WorkspaceBillingReport',
875
+ request_serializer=modal__proto_dot_api__pb2.WorkspaceBillingReportRequest.SerializeToString,
876
+ response_deserializer=modal__proto_dot_api__pb2.WorkspaceBillingReportItem.FromString,
877
+ )
873
878
  self.WorkspaceNameLookup = channel.unary_unary(
874
879
  '/modal.client.ModalClient/WorkspaceNameLookup',
875
880
  request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
@@ -1938,13 +1943,19 @@ class ModalClientServicer(object):
1938
1943
  context.set_details('Method not implemented!')
1939
1944
  raise NotImplementedError('Method not implemented!')
1940
1945
 
1941
- def WorkspaceNameLookup(self, request, context):
1946
+ def WorkspaceBillingReport(self, request, context):
1942
1947
  """Workspaces
1943
1948
  """
1944
1949
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1945
1950
  context.set_details('Method not implemented!')
1946
1951
  raise NotImplementedError('Method not implemented!')
1947
1952
 
1953
+ def WorkspaceNameLookup(self, request, context):
1954
+ """Missing associated documentation comment in .proto file."""
1955
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
1956
+ context.set_details('Method not implemented!')
1957
+ raise NotImplementedError('Method not implemented!')
1958
+
1948
1959
 
1949
1960
  def add_ModalClientServicer_to_server(servicer, server):
1950
1961
  rpc_method_handlers = {
@@ -2803,6 +2814,11 @@ def add_ModalClientServicer_to_server(servicer, server):
2803
2814
  request_deserializer=modal__proto_dot_api__pb2.VolumeRenameRequest.FromString,
2804
2815
  response_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
2805
2816
  ),
2817
+ 'WorkspaceBillingReport': grpc.unary_stream_rpc_method_handler(
2818
+ servicer.WorkspaceBillingReport,
2819
+ request_deserializer=modal__proto_dot_api__pb2.WorkspaceBillingReportRequest.FromString,
2820
+ response_serializer=modal__proto_dot_api__pb2.WorkspaceBillingReportItem.SerializeToString,
2821
+ ),
2806
2822
  'WorkspaceNameLookup': grpc.unary_unary_rpc_method_handler(
2807
2823
  servicer.WorkspaceNameLookup,
2808
2824
  request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
@@ -5725,6 +5741,23 @@ class ModalClient(object):
5725
5741
  options, channel_credentials,
5726
5742
  insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
5727
5743
 
5744
+ @staticmethod
5745
+ def WorkspaceBillingReport(request,
5746
+ target,
5747
+ options=(),
5748
+ channel_credentials=None,
5749
+ call_credentials=None,
5750
+ insecure=False,
5751
+ compression=None,
5752
+ wait_for_ready=None,
5753
+ timeout=None,
5754
+ metadata=None):
5755
+ return grpc.experimental.unary_stream(request, target, '/modal.client.ModalClient/WorkspaceBillingReport',
5756
+ modal__proto_dot_api__pb2.WorkspaceBillingReportRequest.SerializeToString,
5757
+ modal__proto_dot_api__pb2.WorkspaceBillingReportItem.FromString,
5758
+ options, channel_credentials,
5759
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
5760
+
5728
5761
  @staticmethod
5729
5762
  def WorkspaceNameLookup(request,
5730
5763
  target,
@@ -726,11 +726,15 @@ class ModalClientStub:
726
726
  modal_proto.api_pb2.VolumeRenameRequest,
727
727
  google.protobuf.empty_pb2.Empty,
728
728
  ]
729
+ WorkspaceBillingReport: grpc.UnaryStreamMultiCallable[
730
+ modal_proto.api_pb2.WorkspaceBillingReportRequest,
731
+ modal_proto.api_pb2.WorkspaceBillingReportItem,
732
+ ]
733
+ """Workspaces"""
729
734
  WorkspaceNameLookup: grpc.UnaryUnaryMultiCallable[
730
735
  google.protobuf.empty_pb2.Empty,
731
736
  modal_proto.api_pb2.WorkspaceNameLookupResponse,
732
737
  ]
733
- """Workspaces"""
734
738
 
735
739
  class ModalClientServicer(metaclass=abc.ABCMeta):
736
740
  @abc.abstractmethod
@@ -1792,11 +1796,17 @@ class ModalClientServicer(metaclass=abc.ABCMeta):
1792
1796
  context: grpc.ServicerContext,
1793
1797
  ) -> google.protobuf.empty_pb2.Empty: ...
1794
1798
  @abc.abstractmethod
1799
+ def WorkspaceBillingReport(
1800
+ self,
1801
+ request: modal_proto.api_pb2.WorkspaceBillingReportRequest,
1802
+ context: grpc.ServicerContext,
1803
+ ) -> collections.abc.Iterator[modal_proto.api_pb2.WorkspaceBillingReportItem]:
1804
+ """Workspaces"""
1805
+ @abc.abstractmethod
1795
1806
  def WorkspaceNameLookup(
1796
1807
  self,
1797
1808
  request: google.protobuf.empty_pb2.Empty,
1798
1809
  context: grpc.ServicerContext,
1799
- ) -> modal_proto.api_pb2.WorkspaceNameLookupResponse:
1800
- """Workspaces"""
1810
+ ) -> modal_proto.api_pb2.WorkspaceNameLookupResponse: ...
1801
1811
 
1802
1812
  def add_ModalClientServicer_to_server(servicer: ModalClientServicer, server: grpc.Server) -> None: ...
@@ -189,4 +189,5 @@ class ModalClientModal:
189
189
  self.VolumeRemoveFile = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumeRemoveFile, client, server_url)
190
190
  self.VolumeRemoveFile2 = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumeRemoveFile2, client, server_url)
191
191
  self.VolumeRename = modal.client.UnaryUnaryWrapper(grpclib_stub.VolumeRename, client, server_url)
192
+ self.WorkspaceBillingReport = modal.client.UnaryStreamWrapper(grpclib_stub.WorkspaceBillingReport, client, server_url)
192
193
  self.WorkspaceNameLookup = modal.client.UnaryUnaryWrapper(grpclib_stub.WorkspaceNameLookup, client, server_url)
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.1.5.dev53"
4
+ __version__ = "1.1.5.dev54"