viam-sdk 0.56.0__py3-none-macosx_11_0_arm64.whl → 0.57.1__py3-none-macosx_11_0_arm64.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 viam-sdk might be problematic. Click here for more details.

viam/app/app_client.py CHANGED
@@ -530,11 +530,9 @@ class AppClient:
530
530
  async def main():
531
531
 
532
532
  # Make a ViamClient
533
- viam_client = await connect()
534
- # Instantiate an AppClient called "cloud" to run cloud app API methods on
535
- cloud = viam_client.app_client
536
-
537
- viam_client.close()
533
+ async with await connect() as viam_client:
534
+ # Instantiate an AppClient called "cloud" to run cloud app API methods on
535
+ cloud = viam_client.app_client
538
536
 
539
537
  if __name__ == '__main__':
540
538
  asyncio.run(main())
@@ -42,11 +42,9 @@ class BillingClient:
42
42
 
43
43
  async def main():
44
44
  # Make a ViamClient
45
- viam_client = await connect()
46
- # Instantiate a BillingClient to run billing client API methods on
47
- billing_client = viam_client.billing_client
48
-
49
- viam_client.close()
45
+ async with await connect() as viam_client:
46
+ # Instantiate a BillingClient to run billing client API methods on
47
+ billing_client = viam_client.billing_client
50
48
 
51
49
  if __name__ == '__main__':
52
50
  asyncio.run(main())
@@ -145,7 +143,12 @@ class BillingClient:
145
143
  return await self._billing_client.GetOrgBillingInformation(request, metadata=self._metadata, timeout=timeout)
146
144
 
147
145
  async def create_invoice_and_charge_immediately(
148
- self, org_id_to_charge: str, amount: float, description: Optional[str] = None, org_id_for_branding: Optional[str] = None
146
+ self,
147
+ org_id_to_charge: str,
148
+ amount: float,
149
+ description: Optional[str] = None,
150
+ org_id_for_branding: Optional[str] = None,
151
+ disable_email: bool = False,
149
152
  ) -> None:
150
153
  """Create a flat fee invoice and charge the organization on the spot. The caller must be an owner of the organization being charged.
151
154
  This function blocks until payment is confirmed, but will time out after 2 minutes if there is no confirmation.
@@ -159,9 +162,14 @@ class BillingClient:
159
162
  amount (float): the amount to charge in dollars
160
163
  description (str): a short description of the charge to display on the invoice PDF (must be 100 characters or less)
161
164
  org_id_for_branding (str): the organization whose branding to use in the invoice confirmation email
165
+ disable_email (bool): whether or not to disable sending an email confirmation for the invoice
162
166
  """
163
167
  request = CreateInvoiceAndChargeImmediatelyRequest(
164
- org_id_to_charge=org_id_to_charge, amount=amount, description=description, org_id_for_branding=org_id_for_branding
168
+ org_id_to_charge=org_id_to_charge,
169
+ amount=amount,
170
+ description=description,
171
+ org_id_for_branding=org_id_for_branding,
172
+ disable_email=disable_email,
165
173
  )
166
174
  _: CreateInvoiceAndChargeImmediatelyResponse = await self._billing_client.CreateInvoiceAndChargeImmediately(
167
175
  request, metadata=self._metadata
viam/app/data_client.py CHANGED
@@ -27,12 +27,14 @@ from viam.proto.app.data import (
27
27
  CaptureInterval,
28
28
  CaptureMetadata,
29
29
  ConfigureDatabaseUserRequest,
30
+ CreateIndexRequest,
30
31
  DataRequest,
31
32
  DataServiceStub,
32
33
  DeleteBinaryDataByFilterRequest,
33
34
  DeleteBinaryDataByFilterResponse,
34
35
  DeleteBinaryDataByIDsRequest,
35
36
  DeleteBinaryDataByIDsResponse,
37
+ DeleteIndexRequest,
36
38
  DeleteTabularDataRequest,
37
39
  DeleteTabularDataResponse,
38
40
  ExportTabularDataRequest,
@@ -42,6 +44,10 @@ from viam.proto.app.data import (
42
44
  GetDatabaseConnectionResponse,
43
45
  GetLatestTabularDataRequest,
44
46
  GetLatestTabularDataResponse,
47
+ Index,
48
+ IndexableCollection,
49
+ ListIndexesRequest,
50
+ ListIndexesResponse,
45
51
  Order,
46
52
  RemoveBinaryDataFromDatasetByIDsRequest,
47
53
  RemoveBoundingBoxFromImageByIDRequest,
@@ -90,6 +96,8 @@ from viam.proto.app.dataset import (
90
96
  ListDatasetsByIDsResponse,
91
97
  ListDatasetsByOrganizationIDRequest,
92
98
  ListDatasetsByOrganizationIDResponse,
99
+ MergeDatasetsRequest,
100
+ MergeDatasetsResponse,
93
101
  RenameDatasetRequest,
94
102
  )
95
103
  from viam.proto.app.datasync import (
@@ -134,11 +142,9 @@ class DataClient:
134
142
 
135
143
  async def main():
136
144
  # Make a ViamClient
137
- viam_client = await connect()
138
- # Instantiate a DataClient to run data client API methods on
139
- data_client = viam_client.data_client
140
-
141
- viam_client.close()
145
+ async with await connect() as viam_client:
146
+ # Instantiate a DataClient to run data client API methods on
147
+ data_client = viam_client.data_client
142
148
 
143
149
  if __name__ == '__main__':
144
150
  asyncio.run(main())
@@ -499,6 +505,7 @@ class DataClient:
499
505
  use_recent_data: Optional[bool] = None,
500
506
  tabular_data_source_type: TabularDataSourceType.ValueType = TabularDataSourceType.TABULAR_DATA_SOURCE_TYPE_STANDARD,
501
507
  pipeline_id: Optional[str] = None,
508
+ query_prefix_name: Optional[str] = None,
502
509
  ) -> List[Dict[str, Union[ValueTypes, datetime]]]:
503
510
  """Obtain unified tabular data and metadata, queried with MQL.
504
511
 
@@ -525,6 +532,7 @@ class DataClient:
525
532
  Defaults to `TABULAR_DATA_SOURCE_TYPE_STANDARD`.
526
533
  pipeline_id (str): The ID of the data pipeline to query. Defaults to `None`.
527
534
  Required if `tabular_data_source_type` is `TABULAR_DATA_SOURCE_TYPE_PIPELINE_SINK`.
535
+ query_prefix_name (str): Optional field that can be used to specify a saved query to run.
528
536
 
529
537
  Returns:
530
538
  List[Dict[str, Union[ValueTypes, datetime]]]: An array of decoded BSON data objects.
@@ -535,7 +543,12 @@ class DataClient:
535
543
  data_source = TabularDataSource(type=tabular_data_source_type, pipeline_id=pipeline_id)
536
544
  if use_recent_data:
537
545
  data_source.type = TabularDataSourceType.TABULAR_DATA_SOURCE_TYPE_HOT_STORAGE
538
- request = TabularDataByMQLRequest(organization_id=organization_id, mql_binary=binary, data_source=data_source)
546
+ request = TabularDataByMQLRequest(
547
+ organization_id=organization_id,
548
+ mql_binary=binary,
549
+ data_source=data_source,
550
+ query_prefix_name=query_prefix_name,
551
+ )
539
552
  response: TabularDataByMQLResponse = await self._data_client.TabularDataByMQL(request, metadata=self._metadata)
540
553
  return [bson.decode(bson_bytes) for bson_bytes in response.raw_data]
541
554
 
@@ -1131,8 +1144,8 @@ class DataClient:
1131
1144
 
1132
1145
  Args:
1133
1146
  binary_id (Union[~viam.proto.app.data.BinaryID, str]): The binary data ID or :class:`BinaryID` of the image to add the bounding
1134
- box to. *DEPRECATED:* :class:`BinaryID` *is deprecated and will be removed in a future release. Instead, pass binary data
1135
- IDs as a list of strings.*
1147
+ box to. *DEPRECATED:* :class:`BinaryID` *is deprecated and will be removed in a future release. Instead, pass binary data IDs as a
1148
+ list of strings.*
1136
1149
  label (str): A label for the bounding box.
1137
1150
  x_min_normalized (float): Min X value of the bounding box normalized from 0 to 1.
1138
1151
  y_min_normalized (float): Min Y value of the bounding box normalized from 0 to 1.
@@ -1289,6 +1302,32 @@ class DataClient:
1289
1302
  response: CreateDatasetResponse = await self._dataset_client.CreateDataset(request, metadata=self._metadata)
1290
1303
  return response.id
1291
1304
 
1305
+ async def merge_datasets(self, name: str, organization_id: str, dataset_ids: List[str]) -> str:
1306
+ """Merge multiple datasets into a new dataset.
1307
+
1308
+ ::
1309
+
1310
+ dataset_id = await data_client.merge_datasets(
1311
+ name="<DATASET-NAME>",
1312
+ organization_id="<YOUR-ORG-ID>",
1313
+ dataset_ids=["<YOUR-DATASET-ID-1>", "<YOUR-DATASET-ID-2>"]
1314
+ )
1315
+ print(dataset_id)
1316
+
1317
+ Args:
1318
+ name (str): The name of the dataset being created.
1319
+ organization_id (str): The ID of the organization where the dataset is being created.
1320
+ To find your organization ID, visit the organization settings page.
1321
+ dataset_ids (List[str]): The IDs of the datasets that you would like to merge.
1322
+ Returns:
1323
+ str: The dataset ID of the created dataset.
1324
+
1325
+ For more information, see `Data Client API <https://docs.viam.com/dev/reference/apis/data-client/#mergedatasets>`_.
1326
+ """
1327
+ request = MergeDatasetsRequest(name=name, organization_id=organization_id, dataset_ids=dataset_ids)
1328
+ response: MergeDatasetsResponse = await self._dataset_client.MergeDatasets(request, metadata=self._metadata)
1329
+ return response.dataset_id
1330
+
1292
1331
  async def list_dataset_by_ids(self, ids: List[str]) -> Sequence[Dataset]:
1293
1332
  """Get a list of datasets using their IDs.
1294
1333
 
@@ -1859,9 +1898,8 @@ class DataClient:
1859
1898
  path = Path(filepath)
1860
1899
  file_name = path.stem
1861
1900
  file_extension = path.suffix if path.suffix != "" else None
1862
- f = open(filepath, "rb")
1863
- data = f.read()
1864
- f.close()
1901
+ with open(filepath, "rb") as f:
1902
+ data = f.read()
1865
1903
 
1866
1904
  metadata = UploadMetadata(
1867
1905
  part_id=part_id,
@@ -2035,6 +2073,86 @@ class DataClient:
2035
2073
  response: ListDataPipelineRunsResponse = await self._data_pipelines_client.ListDataPipelineRuns(request, metadata=self._metadata)
2036
2074
  return DataClient.DataPipelineRunsPage.from_proto(response, self, page_size)
2037
2075
 
2076
+ async def create_index(
2077
+ self,
2078
+ organization_id: str,
2079
+ collection_type: IndexableCollection.ValueType,
2080
+ index_spec: Dict[str, Any],
2081
+ pipeline_name: Optional[str] = None,
2082
+ ) -> None:
2083
+ """Starts a custom index build.
2084
+
2085
+ Args:
2086
+ organization_id (str): The ID of the organization that owns the data.
2087
+ To find your organization ID, visit the organization settings page.
2088
+ collection_type (IndexableCollection.ValueType): The type of collection the index is on.
2089
+ index_spec (List[Dict[str, Any]]): The MongoDB index specification defined in JSON format.
2090
+ pipeline_name (Optional[str]): The name of the pipeline if the collection type is PIPELINE_SINK.
2091
+
2092
+ For more information, see `Data Client API <https://docs.viam.com/dev/reference/apis/data-client/#createindex>`_.
2093
+ """
2094
+ index_spec_bytes = [bson.encode(index_spec)]
2095
+ request = CreateIndexRequest(
2096
+ organization_id=organization_id,
2097
+ collection_type=collection_type,
2098
+ index_spec=index_spec_bytes,
2099
+ pipeline_name=pipeline_name,
2100
+ )
2101
+ await self._data_client.CreateIndex(request, metadata=self._metadata)
2102
+
2103
+ async def list_indexes(
2104
+ self,
2105
+ organization_id: str,
2106
+ collection_type: IndexableCollection.ValueType,
2107
+ pipeline_name: Optional[str] = None,
2108
+ ) -> Sequence[Index]:
2109
+ """Returns all the indexes for a given collection.
2110
+
2111
+ Args:
2112
+ organization_id (str): The ID of the organization that owns the data.
2113
+ To find your organization ID, visit the organization settings page.
2114
+ collection_type (IndexableCollection.ValueType): The type of collection the index is on.
2115
+ pipeline_name (Optional[str]): The name of the pipeline if the collection type is PIPELINE_SINK.
2116
+
2117
+ Returns:
2118
+ List[Index]: A list of indexes.
2119
+
2120
+ For more information, see `Data Client API <https://docs.viam.com/dev/reference/apis/data-client/#listindexes>`_.
2121
+ """
2122
+ request = ListIndexesRequest(
2123
+ organization_id=organization_id,
2124
+ collection_type=collection_type,
2125
+ pipeline_name=pipeline_name,
2126
+ )
2127
+ response: ListIndexesResponse = await self._data_client.ListIndexes(request, metadata=self._metadata)
2128
+ return response.indexes
2129
+
2130
+ async def delete_index(
2131
+ self,
2132
+ organization_id: str,
2133
+ collection_type: IndexableCollection.ValueType,
2134
+ index_name: str,
2135
+ pipeline_name: Optional[str] = None,
2136
+ ) -> None:
2137
+ """Drops the specified custom index from a collection.
2138
+
2139
+ Args:
2140
+ organization_id (str): The ID of the organization that owns the data.
2141
+ To find your organization ID, visit the organization settings page.
2142
+ collection_type (IndexableCollection.ValueType): The type of collection the index is on.
2143
+ index_name (str): The name of the index to delete.
2144
+ pipeline_name (Optional[str]): The name of the pipeline if the collection type is PIPELINE_SINK.
2145
+
2146
+ For more information, see `Data Client API <https://docs.viam.com/dev/reference/apis/data-client/#deleteindex>`_.
2147
+ """
2148
+ request = DeleteIndexRequest(
2149
+ organization_id=organization_id,
2150
+ collection_type=collection_type,
2151
+ index_name=index_name,
2152
+ pipeline_name=pipeline_name,
2153
+ )
2154
+ await self._data_client.DeleteIndex(request, metadata=self._metadata)
2155
+
2038
2156
  @staticmethod
2039
2157
  def create_filter(
2040
2158
  component_name: Optional[str] = None,
@@ -46,11 +46,9 @@ class MLTrainingClient:
46
46
  async def main():
47
47
 
48
48
  # Make a ViamClient
49
- viam_client = await connect()
50
- # Instantiate an MLTrainingClient to run ML training client API methods on
51
- ml_training_client = viam_client.ml_training_client
52
-
53
- viam_client.close()
49
+ async with await connect() as viam_client:
50
+ # Instantiate an MLTrainingClient to run ML training client API methods on
51
+ ml_training_client = viam_client.ml_training_client
54
52
 
55
53
  if __name__ == '__main__':
56
54
  asyncio.run(main())
@@ -41,11 +41,9 @@ class ProvisioningClient:
41
41
  async def main():
42
42
 
43
43
  # Make a ViamClient
44
- viam_client = await connect()
45
- # Instantiate a ProvisioningClient to run provisioning client API methods on
46
- provisioning_client = viam_client.provisioning_client
47
-
48
- viam_client.close()
44
+ async with await connect() as viam_client:
45
+ # Instantiate a ProvisioningClient to run provisioning client API methods on
46
+ provisioning_client = viam_client.provisioning_client
49
47
 
50
48
  if __name__ == '__main__':
51
49
  asyncio.run(main())
viam/app/viam_client.py CHANGED
@@ -1,5 +1,5 @@
1
1
  import os
2
- from typing import Mapping, Optional
2
+ from typing import Any, Mapping, Optional
3
3
 
4
4
  from grpclib.client import Channel
5
5
  from typing_extensions import Self
@@ -206,6 +206,24 @@ class ViamClient:
206
206
  """
207
207
  return ProvisioningClient(self._channel, self._metadata)
208
208
 
209
+ async def __aenter__(self) -> "ViamClient":
210
+ """A ViamClient can act as an asynchronous context manager. It will do nothing special when
211
+ the context is entered.
212
+ """
213
+ return self
214
+
215
+ async def __aexit__(self, exc_type: Optional[type], exc_value: Optional[BaseException], traceback: Optional[Any]) -> None:
216
+ """A ViamClient can act as an asynchronous context manager. It will close itself when
217
+ the context is exited.
218
+
219
+ ::
220
+
221
+ async with ViamClient.create_from_dial_options(...) as client:
222
+ await do_something_with(client)
223
+ # client is closed here
224
+ """
225
+ self.close()
226
+
209
227
  def close(self) -> None:
210
228
  """Close opened channels used for the various service stubs initialized."""
211
229
  if self._closed:
@@ -104,8 +104,20 @@ class DataServiceBase(abc.ABC):
104
104
  async def RemoveBinaryDataFromDatasetByIDs(self, stream: 'grpclib.server.Stream[app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsRequest, app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsResponse]') -> None:
105
105
  pass
106
106
 
107
+ @abc.abstractmethod
108
+ async def CreateIndex(self, stream: 'grpclib.server.Stream[app.data.v1.data_pb2.CreateIndexRequest, app.data.v1.data_pb2.CreateIndexResponse]') -> None:
109
+ pass
110
+
111
+ @abc.abstractmethod
112
+ async def ListIndexes(self, stream: 'grpclib.server.Stream[app.data.v1.data_pb2.ListIndexesRequest, app.data.v1.data_pb2.ListIndexesResponse]') -> None:
113
+ pass
114
+
115
+ @abc.abstractmethod
116
+ async def DeleteIndex(self, stream: 'grpclib.server.Stream[app.data.v1.data_pb2.DeleteIndexRequest, app.data.v1.data_pb2.DeleteIndexResponse]') -> None:
117
+ pass
118
+
107
119
  def __mapping__(self) -> typing.Dict[str, grpclib.const.Handler]:
108
- return {'/viam.app.data.v1.DataService/TabularDataByFilter': grpclib.const.Handler(self.TabularDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.TabularDataByFilterRequest, app.data.v1.data_pb2.TabularDataByFilterResponse), '/viam.app.data.v1.DataService/TabularDataBySQL': grpclib.const.Handler(self.TabularDataBySQL, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.TabularDataBySQLRequest, app.data.v1.data_pb2.TabularDataBySQLResponse), '/viam.app.data.v1.DataService/TabularDataByMQL': grpclib.const.Handler(self.TabularDataByMQL, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.TabularDataByMQLRequest, app.data.v1.data_pb2.TabularDataByMQLResponse), '/viam.app.data.v1.DataService/ExportTabularData': grpclib.const.Handler(self.ExportTabularData, grpclib.const.Cardinality.UNARY_STREAM, app.data.v1.data_pb2.ExportTabularDataRequest, app.data.v1.data_pb2.ExportTabularDataResponse), '/viam.app.data.v1.DataService/GetLatestTabularData': grpclib.const.Handler(self.GetLatestTabularData, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.GetLatestTabularDataRequest, app.data.v1.data_pb2.GetLatestTabularDataResponse), '/viam.app.data.v1.DataService/BinaryDataByFilter': grpclib.const.Handler(self.BinaryDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.BinaryDataByFilterRequest, app.data.v1.data_pb2.BinaryDataByFilterResponse), '/viam.app.data.v1.DataService/BinaryDataByIDs': grpclib.const.Handler(self.BinaryDataByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.BinaryDataByIDsRequest, app.data.v1.data_pb2.BinaryDataByIDsResponse), '/viam.app.data.v1.DataService/DeleteTabularData': grpclib.const.Handler(self.DeleteTabularData, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.DeleteTabularDataRequest, app.data.v1.data_pb2.DeleteTabularDataResponse), '/viam.app.data.v1.DataService/DeleteBinaryDataByFilter': grpclib.const.Handler(self.DeleteBinaryDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.DeleteBinaryDataByFilterRequest, app.data.v1.data_pb2.DeleteBinaryDataByFilterResponse), '/viam.app.data.v1.DataService/DeleteBinaryDataByIDs': grpclib.const.Handler(self.DeleteBinaryDataByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.DeleteBinaryDataByIDsRequest, app.data.v1.data_pb2.DeleteBinaryDataByIDsResponse), '/viam.app.data.v1.DataService/AddTagsToBinaryDataByIDs': grpclib.const.Handler(self.AddTagsToBinaryDataByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.AddTagsToBinaryDataByIDsRequest, app.data.v1.data_pb2.AddTagsToBinaryDataByIDsResponse), '/viam.app.data.v1.DataService/AddTagsToBinaryDataByFilter': grpclib.const.Handler(self.AddTagsToBinaryDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.AddTagsToBinaryDataByFilterRequest, app.data.v1.data_pb2.AddTagsToBinaryDataByFilterResponse), '/viam.app.data.v1.DataService/RemoveTagsFromBinaryDataByIDs': grpclib.const.Handler(self.RemoveTagsFromBinaryDataByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.RemoveTagsFromBinaryDataByIDsRequest, app.data.v1.data_pb2.RemoveTagsFromBinaryDataByIDsResponse), '/viam.app.data.v1.DataService/RemoveTagsFromBinaryDataByFilter': grpclib.const.Handler(self.RemoveTagsFromBinaryDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.RemoveTagsFromBinaryDataByFilterRequest, app.data.v1.data_pb2.RemoveTagsFromBinaryDataByFilterResponse), '/viam.app.data.v1.DataService/TagsByFilter': grpclib.const.Handler(self.TagsByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.TagsByFilterRequest, app.data.v1.data_pb2.TagsByFilterResponse), '/viam.app.data.v1.DataService/AddBoundingBoxToImageByID': grpclib.const.Handler(self.AddBoundingBoxToImageByID, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.AddBoundingBoxToImageByIDRequest, app.data.v1.data_pb2.AddBoundingBoxToImageByIDResponse), '/viam.app.data.v1.DataService/RemoveBoundingBoxFromImageByID': grpclib.const.Handler(self.RemoveBoundingBoxFromImageByID, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.RemoveBoundingBoxFromImageByIDRequest, app.data.v1.data_pb2.RemoveBoundingBoxFromImageByIDResponse), '/viam.app.data.v1.DataService/BoundingBoxLabelsByFilter': grpclib.const.Handler(self.BoundingBoxLabelsByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.BoundingBoxLabelsByFilterRequest, app.data.v1.data_pb2.BoundingBoxLabelsByFilterResponse), '/viam.app.data.v1.DataService/UpdateBoundingBox': grpclib.const.Handler(self.UpdateBoundingBox, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.UpdateBoundingBoxRequest, app.data.v1.data_pb2.UpdateBoundingBoxResponse), '/viam.app.data.v1.DataService/GetDatabaseConnection': grpclib.const.Handler(self.GetDatabaseConnection, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.GetDatabaseConnectionRequest, app.data.v1.data_pb2.GetDatabaseConnectionResponse), '/viam.app.data.v1.DataService/ConfigureDatabaseUser': grpclib.const.Handler(self.ConfigureDatabaseUser, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.ConfigureDatabaseUserRequest, app.data.v1.data_pb2.ConfigureDatabaseUserResponse), '/viam.app.data.v1.DataService/AddBinaryDataToDatasetByIDs': grpclib.const.Handler(self.AddBinaryDataToDatasetByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.AddBinaryDataToDatasetByIDsRequest, app.data.v1.data_pb2.AddBinaryDataToDatasetByIDsResponse), '/viam.app.data.v1.DataService/RemoveBinaryDataFromDatasetByIDs': grpclib.const.Handler(self.RemoveBinaryDataFromDatasetByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsRequest, app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsResponse)}
120
+ return {'/viam.app.data.v1.DataService/TabularDataByFilter': grpclib.const.Handler(self.TabularDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.TabularDataByFilterRequest, app.data.v1.data_pb2.TabularDataByFilterResponse), '/viam.app.data.v1.DataService/TabularDataBySQL': grpclib.const.Handler(self.TabularDataBySQL, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.TabularDataBySQLRequest, app.data.v1.data_pb2.TabularDataBySQLResponse), '/viam.app.data.v1.DataService/TabularDataByMQL': grpclib.const.Handler(self.TabularDataByMQL, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.TabularDataByMQLRequest, app.data.v1.data_pb2.TabularDataByMQLResponse), '/viam.app.data.v1.DataService/ExportTabularData': grpclib.const.Handler(self.ExportTabularData, grpclib.const.Cardinality.UNARY_STREAM, app.data.v1.data_pb2.ExportTabularDataRequest, app.data.v1.data_pb2.ExportTabularDataResponse), '/viam.app.data.v1.DataService/GetLatestTabularData': grpclib.const.Handler(self.GetLatestTabularData, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.GetLatestTabularDataRequest, app.data.v1.data_pb2.GetLatestTabularDataResponse), '/viam.app.data.v1.DataService/BinaryDataByFilter': grpclib.const.Handler(self.BinaryDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.BinaryDataByFilterRequest, app.data.v1.data_pb2.BinaryDataByFilterResponse), '/viam.app.data.v1.DataService/BinaryDataByIDs': grpclib.const.Handler(self.BinaryDataByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.BinaryDataByIDsRequest, app.data.v1.data_pb2.BinaryDataByIDsResponse), '/viam.app.data.v1.DataService/DeleteTabularData': grpclib.const.Handler(self.DeleteTabularData, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.DeleteTabularDataRequest, app.data.v1.data_pb2.DeleteTabularDataResponse), '/viam.app.data.v1.DataService/DeleteBinaryDataByFilter': grpclib.const.Handler(self.DeleteBinaryDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.DeleteBinaryDataByFilterRequest, app.data.v1.data_pb2.DeleteBinaryDataByFilterResponse), '/viam.app.data.v1.DataService/DeleteBinaryDataByIDs': grpclib.const.Handler(self.DeleteBinaryDataByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.DeleteBinaryDataByIDsRequest, app.data.v1.data_pb2.DeleteBinaryDataByIDsResponse), '/viam.app.data.v1.DataService/AddTagsToBinaryDataByIDs': grpclib.const.Handler(self.AddTagsToBinaryDataByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.AddTagsToBinaryDataByIDsRequest, app.data.v1.data_pb2.AddTagsToBinaryDataByIDsResponse), '/viam.app.data.v1.DataService/AddTagsToBinaryDataByFilter': grpclib.const.Handler(self.AddTagsToBinaryDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.AddTagsToBinaryDataByFilterRequest, app.data.v1.data_pb2.AddTagsToBinaryDataByFilterResponse), '/viam.app.data.v1.DataService/RemoveTagsFromBinaryDataByIDs': grpclib.const.Handler(self.RemoveTagsFromBinaryDataByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.RemoveTagsFromBinaryDataByIDsRequest, app.data.v1.data_pb2.RemoveTagsFromBinaryDataByIDsResponse), '/viam.app.data.v1.DataService/RemoveTagsFromBinaryDataByFilter': grpclib.const.Handler(self.RemoveTagsFromBinaryDataByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.RemoveTagsFromBinaryDataByFilterRequest, app.data.v1.data_pb2.RemoveTagsFromBinaryDataByFilterResponse), '/viam.app.data.v1.DataService/TagsByFilter': grpclib.const.Handler(self.TagsByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.TagsByFilterRequest, app.data.v1.data_pb2.TagsByFilterResponse), '/viam.app.data.v1.DataService/AddBoundingBoxToImageByID': grpclib.const.Handler(self.AddBoundingBoxToImageByID, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.AddBoundingBoxToImageByIDRequest, app.data.v1.data_pb2.AddBoundingBoxToImageByIDResponse), '/viam.app.data.v1.DataService/RemoveBoundingBoxFromImageByID': grpclib.const.Handler(self.RemoveBoundingBoxFromImageByID, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.RemoveBoundingBoxFromImageByIDRequest, app.data.v1.data_pb2.RemoveBoundingBoxFromImageByIDResponse), '/viam.app.data.v1.DataService/BoundingBoxLabelsByFilter': grpclib.const.Handler(self.BoundingBoxLabelsByFilter, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.BoundingBoxLabelsByFilterRequest, app.data.v1.data_pb2.BoundingBoxLabelsByFilterResponse), '/viam.app.data.v1.DataService/UpdateBoundingBox': grpclib.const.Handler(self.UpdateBoundingBox, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.UpdateBoundingBoxRequest, app.data.v1.data_pb2.UpdateBoundingBoxResponse), '/viam.app.data.v1.DataService/GetDatabaseConnection': grpclib.const.Handler(self.GetDatabaseConnection, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.GetDatabaseConnectionRequest, app.data.v1.data_pb2.GetDatabaseConnectionResponse), '/viam.app.data.v1.DataService/ConfigureDatabaseUser': grpclib.const.Handler(self.ConfigureDatabaseUser, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.ConfigureDatabaseUserRequest, app.data.v1.data_pb2.ConfigureDatabaseUserResponse), '/viam.app.data.v1.DataService/AddBinaryDataToDatasetByIDs': grpclib.const.Handler(self.AddBinaryDataToDatasetByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.AddBinaryDataToDatasetByIDsRequest, app.data.v1.data_pb2.AddBinaryDataToDatasetByIDsResponse), '/viam.app.data.v1.DataService/RemoveBinaryDataFromDatasetByIDs': grpclib.const.Handler(self.RemoveBinaryDataFromDatasetByIDs, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsRequest, app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsResponse), '/viam.app.data.v1.DataService/CreateIndex': grpclib.const.Handler(self.CreateIndex, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.CreateIndexRequest, app.data.v1.data_pb2.CreateIndexResponse), '/viam.app.data.v1.DataService/ListIndexes': grpclib.const.Handler(self.ListIndexes, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.ListIndexesRequest, app.data.v1.data_pb2.ListIndexesResponse), '/viam.app.data.v1.DataService/DeleteIndex': grpclib.const.Handler(self.DeleteIndex, grpclib.const.Cardinality.UNARY_UNARY, app.data.v1.data_pb2.DeleteIndexRequest, app.data.v1.data_pb2.DeleteIndexResponse)}
109
121
 
110
122
  class UnimplementedDataServiceBase(DataServiceBase):
111
123
 
@@ -178,6 +190,15 @@ class UnimplementedDataServiceBase(DataServiceBase):
178
190
  async def RemoveBinaryDataFromDatasetByIDs(self, stream: 'grpclib.server.Stream[app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsRequest, app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsResponse]') -> None:
179
191
  raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
180
192
 
193
+ async def CreateIndex(self, stream: 'grpclib.server.Stream[app.data.v1.data_pb2.CreateIndexRequest, app.data.v1.data_pb2.CreateIndexResponse]') -> None:
194
+ raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
195
+
196
+ async def ListIndexes(self, stream: 'grpclib.server.Stream[app.data.v1.data_pb2.ListIndexesRequest, app.data.v1.data_pb2.ListIndexesResponse]') -> None:
197
+ raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
198
+
199
+ async def DeleteIndex(self, stream: 'grpclib.server.Stream[app.data.v1.data_pb2.DeleteIndexRequest, app.data.v1.data_pb2.DeleteIndexResponse]') -> None:
200
+ raise grpclib.exceptions.GRPCError(grpclib.const.Status.UNIMPLEMENTED)
201
+
181
202
  class DataServiceStub:
182
203
 
183
204
  def __init__(self, channel: grpclib.client.Channel) -> None:
@@ -203,4 +224,7 @@ class DataServiceStub:
203
224
  self.GetDatabaseConnection = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.data.v1.DataService/GetDatabaseConnection', app.data.v1.data_pb2.GetDatabaseConnectionRequest, app.data.v1.data_pb2.GetDatabaseConnectionResponse)
204
225
  self.ConfigureDatabaseUser = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.data.v1.DataService/ConfigureDatabaseUser', app.data.v1.data_pb2.ConfigureDatabaseUserRequest, app.data.v1.data_pb2.ConfigureDatabaseUserResponse)
205
226
  self.AddBinaryDataToDatasetByIDs = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.data.v1.DataService/AddBinaryDataToDatasetByIDs', app.data.v1.data_pb2.AddBinaryDataToDatasetByIDsRequest, app.data.v1.data_pb2.AddBinaryDataToDatasetByIDsResponse)
206
- self.RemoveBinaryDataFromDatasetByIDs = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.data.v1.DataService/RemoveBinaryDataFromDatasetByIDs', app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsRequest, app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsResponse)
227
+ self.RemoveBinaryDataFromDatasetByIDs = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.data.v1.DataService/RemoveBinaryDataFromDatasetByIDs', app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsRequest, app.data.v1.data_pb2.RemoveBinaryDataFromDatasetByIDsResponse)
228
+ self.CreateIndex = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.data.v1.DataService/CreateIndex', app.data.v1.data_pb2.CreateIndexRequest, app.data.v1.data_pb2.CreateIndexResponse)
229
+ self.ListIndexes = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.data.v1.DataService/ListIndexes', app.data.v1.data_pb2.ListIndexesRequest, app.data.v1.data_pb2.ListIndexesResponse)
230
+ self.DeleteIndex = grpclib.client.UnaryUnaryMethod(channel, '/viam.app.data.v1.DataService/DeleteIndex', app.data.v1.data_pb2.DeleteIndexRequest, app.data.v1.data_pb2.DeleteIndexResponse)