viam-sdk 0.49.0__py3-none-linux_armv6l.whl → 0.51.0__py3-none-linux_armv6l.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
@@ -786,7 +786,7 @@ class AppClient:
786
786
 
787
787
  Args:
788
788
  org_id (str): The ID of the organization.
789
- You can obtain your organization ID from the Viam app's organization settings page.
789
+ You can obtain your organization ID from the organization settings page.
790
790
 
791
791
  For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#deleteorganization>`_.
792
792
  """
@@ -802,7 +802,7 @@ class AppClient:
802
802
 
803
803
  Args:
804
804
  org_id (str): The ID of the organization to list members of.
805
- You can obtain your organization ID from the Viam app's organization settings page.
805
+ You can obtain your organization ID from the organization settings page.
806
806
 
807
807
  Returns:
808
808
  Tuple[List[viam.proto.app.OrganizationMember], List[viam.proto.app.OrganizationInvite]]: A tuple containing two lists; the first
@@ -829,7 +829,7 @@ class AppClient:
829
829
 
830
830
  Args:
831
831
  org_id (str): The ID of the organization to create an invite for.
832
- You can obtain your organization ID from the Viam app's organization settings page.
832
+ You can obtain your organization ID from the organization settings page.
833
833
  email (str): The email address to send the invite to.
834
834
  authorizations (Optional[List[viam.proto.app.Authorization]]): Specifications of the
835
835
  authorizations to include in the invite. If not provided, full owner permissions will
@@ -887,7 +887,7 @@ class AppClient:
887
887
 
888
888
  Args:
889
889
  org_id (str): The ID of the organization that the invite is for.
890
- You can obtain your organization ID from the Viam app's organization settings page.
890
+ You can obtain your organization ID from the organization settings page.
891
891
  email (str): Email of the user the invite was sent to.
892
892
  add_authorizations (Optional[List[viam.proto.app.Authorization]]): Optional list of authorizations to add to the invite.
893
893
  remove_authorizations (Optional[List[viam.proto.app.Authorization]]): Optional list of authorizations to remove from the invite.
@@ -921,7 +921,7 @@ class AppClient:
921
921
 
922
922
  Args:
923
923
  org_id (str): The ID of the org to remove the user from.
924
- You can obtain your organization ID from the Viam app's organization settings page.
924
+ You can obtain your organization ID from the organization settings page.
925
925
  user_id (str): The ID of the user to remove.
926
926
 
927
927
  For more information, see `Fleet Management API <https://docs.viam.com/dev/reference/apis/fleet/#deleteorganizationmember>`_.
@@ -938,7 +938,7 @@ class AppClient:
938
938
 
939
939
  Args:
940
940
  org_id (str): The ID of the organization that the invite to delete was for.
941
- You can obtain your organization ID from the Viam app's organization settings page.
941
+ You can obtain your organization ID from the organization settings page.
942
942
  email (str): The email address the pending invite was sent to.
943
943
 
944
944
  Raises:
@@ -958,7 +958,7 @@ class AppClient:
958
958
 
959
959
  Args:
960
960
  org_id (str): The ID of the organization that the invite to resend was for.
961
- You can obtain your organization ID from the Viam app's organization settings page.
961
+ You can obtain your organization ID from the organization settings page.
962
962
  email (str): The email address associated with the invite.
963
963
 
964
964
  Raises:
@@ -982,7 +982,7 @@ class AppClient:
982
982
 
983
983
  Args:
984
984
  org_id (str): The ID of the organization to create the location under.
985
- You can obtain your organization ID from the Viam app's organization settings page.
985
+ You can obtain your organization ID from the organization settings page.
986
986
  name (str): Name of the location.
987
987
  parent_location_id (Optional[str]): Optional parent location to put the location under. Defaults to a root-level location if no
988
988
  location ID is provided.
@@ -1094,7 +1094,7 @@ class AppClient:
1094
1094
 
1095
1095
  Args:
1096
1096
  org_id (str): The ID of the org to list locations for.
1097
- You can obtain your organization ID from the Viam app's organization settings page.
1097
+ You can obtain your organization ID from the organization settings page.
1098
1098
 
1099
1099
  Returns:
1100
1100
  List[viam.proto.app.Location]: The list of locations.
@@ -1241,7 +1241,7 @@ class AppClient:
1241
1241
 
1242
1242
  Args:
1243
1243
  org_id (str): The ID of the organization to list rover rental robots for.
1244
- You can obtain your organization ID from the Viam app's organization settings page.
1244
+ You can obtain your organization ID from the organization settings page.
1245
1245
 
1246
1246
  Returns:
1247
1247
  List[viam.proto.app.RoverRentalRobot]: The list of rover rental robots.
@@ -1744,7 +1744,7 @@ class AppClient:
1744
1744
 
1745
1745
  Args:
1746
1746
  org_id (str): The ID of the organization to list fragments for.
1747
- You can obtain your organization ID from the Viam app's organization settings page.
1747
+ You can obtain your organization ID from the organization settings page.
1748
1748
  show_public (bool): Optional boolean specifying whether or not to only show public fragments. If True, only public fragments
1749
1749
  will return. If False, only private fragments will return. Defaults to True.
1750
1750
 
@@ -1800,7 +1800,7 @@ class AppClient:
1800
1800
 
1801
1801
  Args:
1802
1802
  org_id (str): The ID of the organization to create the fragment within.
1803
- You can obtain your organization ID from the Viam app's organization settings page.
1803
+ You can obtain your organization ID from the organization settings page.
1804
1804
  name (str): Name of the fragment.
1805
1805
  config (Optional[Mapping[str, Any]]): Optional Dictionary representation of new config to assign to specified fragment. Can be
1806
1806
  assigned by updating the fragment.
@@ -1942,7 +1942,7 @@ class AppClient:
1942
1942
 
1943
1943
  Args:
1944
1944
  org_id (str): The ID of the organization to create the role in.
1945
- You can obtain your organization ID from the Viam app's organization settings page.
1945
+ You can obtain your organization ID from the organization settings page.
1946
1946
  identity_id (str): ID of the entity the role belongs to (for example, a user ID).
1947
1947
  role (Union[Literal["owner"], Literal["operator"]]): The role to add.
1948
1948
  resource_type (Union[Literal["organization"], Literal["location"], Literal["robot"]]): Type of the resource to add role to.
@@ -1987,7 +1987,7 @@ class AppClient:
1987
1987
 
1988
1988
  Args:
1989
1989
  org_id (str): The ID of the organization the role exists in.
1990
- You can obtain your organization ID from the Viam app's organization settings page.
1990
+ You can obtain your organization ID from the organization settings page.
1991
1991
  identity_id (str): ID of the entity the role belongs to (for example, a user ID).
1992
1992
  role (Union[Literal["owner"], Literal["operator"]]): The role to remove.
1993
1993
  resource_type (Union[Literal["organization"], Literal["location"], Literal["robot"]]): Type of the resource the role is being
@@ -2290,7 +2290,7 @@ class AppClient:
2290
2290
 
2291
2291
  Args:
2292
2292
  org_id (str): The ID of the organization to create the module under.
2293
- You can obtain your organization ID from the Viam app's organization settings page.
2293
+ You can obtain your organization ID from the organization settings page.
2294
2294
  name (str): The name of the module. Must be unique within your organization.
2295
2295
 
2296
2296
  Raises:
@@ -2431,7 +2431,7 @@ class AppClient:
2431
2431
 
2432
2432
  Args:
2433
2433
  org_id (str): The ID of the organization to list modules for.
2434
- You can obtain your organization ID from the Viam app's organization settings page.
2434
+ You can obtain your organization ID from the organization settings page.
2435
2435
 
2436
2436
  Returns:
2437
2437
  List[viam.proto.app.Module]: The list of modules.
@@ -2465,7 +2465,7 @@ class AppClient:
2465
2465
 
2466
2466
  Args:
2467
2467
  org_id (str): The ID of the organization to create the key for.
2468
- You can obtain your organization ID from the Viam app's organization settings page.
2468
+ You can obtain your organization ID from the organization settings page.
2469
2469
  authorizations (List[viam.proto.app.Authorization]): A list of authorizations to associate
2470
2470
  with the key.
2471
2471
  name (Optional[str]): A name for the key. If None, defaults to the current timestamp.
@@ -2531,7 +2531,7 @@ class AppClient:
2531
2531
 
2532
2532
  Args:
2533
2533
  org_id (str): The ID of the organization to list API keys for.
2534
- You can obtain your organization ID from the Viam app's organization settings page.
2534
+ You can obtain your organization ID from the organization settings page.
2535
2535
 
2536
2536
  Returns:
2537
2537
  List[viam.proto.app.APIKeyWithAuthorizations]: The existing API keys and authorizations.
@@ -2570,13 +2570,13 @@ class AppClient:
2570
2570
 
2571
2571
  Args:
2572
2572
  org_id (str): The ID of the organization with which the user-defined metadata is associated.
2573
- You can obtain your organization ID from the Viam app's organization settings page.
2573
+ You can obtain your organization ID from the organization settings page.
2574
2574
 
2575
2575
  Returns:
2576
2576
  Mapping[str, Any]: The user-defined metadata converted from JSON to a Python dictionary
2577
2577
  """
2578
2578
  request = GetOrganizationMetadataRequest(organization_id=org_id)
2579
- response: GetOrganizationMetadataResponse = await self._app_client.GetOrganizationMetadata(request)
2579
+ response: GetOrganizationMetadataResponse = await self._app_client.GetOrganizationMetadata(request, metadata=self._metadata)
2580
2580
  return struct_to_dict(response.data)
2581
2581
 
2582
2582
  async def update_organization_metadata(self, org_id: str, metadata: Mapping[str, Any]) -> None:
@@ -2588,11 +2588,11 @@ class AppClient:
2588
2588
 
2589
2589
  Args:
2590
2590
  organization_id (str): The ID of the organization with which to associate the user-defined metadata.
2591
- You can obtain your organization ID from the Viam app's organization settings page.
2591
+ You can obtain your organization ID from the organization settings page.
2592
2592
  metadata (Mapping[str, Any]): The user-defined metadata to upload as a Python dictionary.
2593
2593
  """
2594
2594
  request = UpdateOrganizationMetadataRequest(organization_id=org_id, data=dict_to_struct(metadata))
2595
- _: UpdateOrganizationMetadataResponse = await self._app_client.UpdateOrganizationMetadata(request)
2595
+ _: UpdateOrganizationMetadataResponse = await self._app_client.UpdateOrganizationMetadata(request, metadata=self._metadata)
2596
2596
 
2597
2597
  async def get_location_metadata(self, location_id: str) -> Mapping[str, Any]:
2598
2598
  """Get a location's user-defined metadata.
@@ -2603,13 +2603,13 @@ class AppClient:
2603
2603
 
2604
2604
  Args:
2605
2605
  location_id (str): The ID of the location with which the user-defined metadata is associated.
2606
- You can obtain your location ID from the Viam app's locations page.
2606
+ You can obtain your location ID from the location's page.
2607
2607
 
2608
2608
  Returns:
2609
2609
  Mapping[str, Any]: The user-defined metadata converted from JSON to a Python dictionary.
2610
2610
  """
2611
2611
  request = GetLocationMetadataRequest(location_id=location_id)
2612
- response: GetLocationMetadataResponse = await self._app_client.GetLocationMetadata(request)
2612
+ response: GetLocationMetadataResponse = await self._app_client.GetLocationMetadata(request, metadata=self._metadata)
2613
2613
  return struct_to_dict(response.data)
2614
2614
 
2615
2615
  async def update_location_metadata(self, location_id: str, metadata: Mapping[str, Any]) -> None:
@@ -2621,11 +2621,11 @@ class AppClient:
2621
2621
 
2622
2622
  Args:
2623
2623
  location_id (str): The ID of the location with which to associate the user-defined metadata.
2624
- You can obtain your location ID from the Viam app's locations page.
2624
+ You can obtain your location ID from the location's page.
2625
2625
  metadata (Mapping[str, Any]): The user-defined metadata converted from JSON to a Python dictionary.
2626
2626
  """
2627
2627
  request = UpdateLocationMetadataRequest(location_id=location_id, data=dict_to_struct(metadata))
2628
- _: UpdateLocationMetadataResponse = await self._app_client.UpdateLocationMetadata(request)
2628
+ _: UpdateLocationMetadataResponse = await self._app_client.UpdateLocationMetadata(request, metadata=self._metadata)
2629
2629
 
2630
2630
  async def get_robot_metadata(self, robot_id: str) -> Mapping[str, Any]:
2631
2631
  """Get a robot's user-defined metadata.
@@ -2636,13 +2636,13 @@ class AppClient:
2636
2636
 
2637
2637
  Args:
2638
2638
  robot_id (str): The ID of the robot with which the user-defined metadata is associated.
2639
- You can obtain your robot ID from the Viam app's machine page.
2639
+ You can obtain your robot ID from the machine page.
2640
2640
 
2641
2641
  Returns:
2642
2642
  Mapping[str, Any]: The user-defined metadata converted from JSON to a Python dictionary.
2643
2643
  """
2644
2644
  request = GetRobotMetadataRequest(id=robot_id)
2645
- response: GetRobotMetadataResponse = await self._app_client.GetRobotMetadata(request)
2645
+ response: GetRobotMetadataResponse = await self._app_client.GetRobotMetadata(request, metadata=self._metadata)
2646
2646
  return struct_to_dict(response.data)
2647
2647
 
2648
2648
  async def update_robot_metadata(self, robot_id: str, metadata: Mapping[str, Any]) -> None:
@@ -2654,11 +2654,11 @@ class AppClient:
2654
2654
 
2655
2655
  Args:
2656
2656
  robot_id (str): The ID of the robot with which to associate the user-defined metadata.
2657
- You can obtain your robot ID from the Viam app's machine page.
2657
+ You can obtain your robot ID from the machine page.
2658
2658
  metadata (Mapping[str, Any]): The user-defined metadata converted from JSON to a Python dictionary.
2659
2659
  """
2660
2660
  request = UpdateRobotMetadataRequest(id=robot_id, data=dict_to_struct(metadata))
2661
- _: UpdateRobotMetadataResponse = await self._app_client.UpdateRobotMetadata(request)
2661
+ _: UpdateRobotMetadataResponse = await self._app_client.UpdateRobotMetadata(request, metadata=self._metadata)
2662
2662
 
2663
2663
  async def get_robot_part_metadata(self, robot_part_id: str) -> Mapping[str, Any]:
2664
2664
  """Get a robot part's user-defined metadata.
@@ -2669,13 +2669,13 @@ class AppClient:
2669
2669
 
2670
2670
  Args:
2671
2671
  robot_part_id (str): The ID of the robot part with which the user-defined metadata is associated.
2672
- You can obtain your robot part ID from the Viam app's machine page.
2672
+ You can obtain your robot part ID from the machine page.
2673
2673
 
2674
2674
  Returns:
2675
2675
  Mapping[str, Any]: The user-defined metadata converted from JSON to a Python dictionary.
2676
2676
  """
2677
2677
  request = GetRobotPartMetadataRequest(id=robot_part_id)
2678
- response: GetRobotPartMetadataResponse = await self._app_client.GetRobotPartMetadata(request)
2678
+ response: GetRobotPartMetadataResponse = await self._app_client.GetRobotPartMetadata(request, metadata=self._metadata)
2679
2679
  return struct_to_dict(response.data)
2680
2680
 
2681
2681
  async def update_robot_part_metadata(self, robot_part_id: str, metadata: Mapping[str, Any]) -> None:
@@ -2687,8 +2687,8 @@ class AppClient:
2687
2687
 
2688
2688
  Args:
2689
2689
  robot_id (str): The ID of the robot part with which to associate the user-defined metadata.
2690
- You can obtain your robot part ID from the Viam app's machine page.
2690
+ You can obtain your robot part ID from the machine page.
2691
2691
  metadata (Mapping[str, Any]): The user-defined metadata converted from JSON to a Python dictionary.
2692
2692
  """
2693
2693
  request = UpdateRobotPartMetadataRequest(id=robot_part_id, data=dict_to_struct(metadata))
2694
- _: UpdateRobotPartMetadataResponse = await self._app_client.UpdateRobotPartMetadata(request)
2694
+ _: UpdateRobotPartMetadataResponse = await self._app_client.UpdateRobotPartMetadata(request, metadata=self._metadata)
viam/app/data_client.py CHANGED
@@ -106,7 +106,7 @@ from viam.proto.app.datasync import (
106
106
  StreamingDataCaptureUploadResponse,
107
107
  UploadMetadata,
108
108
  )
109
- from viam.utils import ValueTypes, _alias_param, create_filter, datetime_to_timestamp, struct_to_dict
109
+ from viam.utils import ValueTypes, _alias_param, create_filter, datetime_to_timestamp, dict_to_struct, struct_to_dict
110
110
 
111
111
  LOGGER = logging.getLogger(__name__)
112
112
 
@@ -474,7 +474,7 @@ class DataClient:
474
474
 
475
475
  Args:
476
476
  organization_id (str): The ID of the organization that owns the data.
477
- To find your organization ID, visit the organization settings page in the Viam app.
477
+ To find your organization ID, visit the organization settings page.
478
478
  sql_query (str): The SQL query to run.
479
479
 
480
480
  Returns:
@@ -510,7 +510,7 @@ class DataClient:
510
510
 
511
511
  Args:
512
512
  organization_id (str): The ID of the organization that owns the data.
513
- To find your organization ID, visit the organization settings page in the Viam app.
513
+ To find your organization ID, visit the organization settings page.
514
514
  query (Union[List[bytes], List[Dict[str, Any]]]): The MQL query to run, as a list of MongoDB aggregation pipeline stages.
515
515
  Each stage can be provided as either a dictionary or raw BSON bytes, but support for bytes will be removed in the
516
516
  future, so prefer the dictionary option.
@@ -536,7 +536,12 @@ class DataClient:
536
536
 
537
537
  @_alias_param("resource_api", param_alias="resource_subtype")
538
538
  async def get_latest_tabular_data(
539
- self, part_id: str, resource_name: str, resource_api: str, method_name: str
539
+ self,
540
+ part_id: str,
541
+ resource_name: str,
542
+ resource_api: str,
543
+ method_name: str,
544
+ additional_params: Optional[Mapping[str, ValueTypes]] = None,
540
545
  ) -> Optional[Tuple[datetime, datetime, Dict[str, ValueTypes]]]:
541
546
  """Gets the most recent tabular data captured from the specified data source, as long as it was synced within the last year.
542
547
 
@@ -546,7 +551,8 @@ class DataClient:
546
551
  part_id="77ae3145-7b91-123a-a234-e567cdca8910",
547
552
  resource_name="camera-1",
548
553
  resource_api="rdk:component:camera",
549
- method_name="GetImage"
554
+ method_name="GetImage",
555
+ additional_params={"docommand_input": {"test": "test"}}
550
556
  )
551
557
 
552
558
  if tabular_data:
@@ -562,6 +568,7 @@ class DataClient:
562
568
  resource_name (str): The name of the requested resource that captured the data. For example, "my-sensor".
563
569
  resource_api (str): The API of the requested resource that captured the data. For example, "rdk:component:sensor".
564
570
  method_name (str): The data capture method name. For exampe, "Readings".
571
+ additional_params (dict): Optional additional parameters of the resource that captured the data.
565
572
 
566
573
  Returns:
567
574
  Optional[Tuple[datetime, datetime, Dict[str, ValueTypes]]]:
@@ -577,7 +584,11 @@ class DataClient:
577
584
  """
578
585
 
579
586
  request = GetLatestTabularDataRequest(
580
- part_id=part_id, resource_name=resource_name, resource_subtype=resource_api, method_name=method_name
587
+ part_id=part_id,
588
+ resource_name=resource_name,
589
+ resource_subtype=resource_api,
590
+ method_name=method_name,
591
+ additional_parameters=dict_to_struct(additional_params) if additional_params is not None else None,
581
592
  )
582
593
  response: GetLatestTabularDataResponse = await self._data_client.GetLatestTabularData(request, metadata=self._metadata)
583
594
  if not response.payload:
@@ -593,6 +604,7 @@ class DataClient:
593
604
  method_name: str,
594
605
  start_time: Optional[datetime] = None,
595
606
  end_time: Optional[datetime] = None,
607
+ additional_params: Optional[Mapping[str, ValueTypes]] = None,
596
608
  ) -> List[TabularDataPoint]:
597
609
  """Obtain unified tabular data and metadata from the specified data source.
598
610
 
@@ -605,6 +617,7 @@ class DataClient:
605
617
  method_name="<METHOD-NAME>",
606
618
  start_time="<START_TIME>"
607
619
  end_time="<END_TIME>"
620
+ additional_params="<ADDITIONAL_PARAMETERS>"
608
621
  )
609
622
 
610
623
  print(f"My data: {tabular_data}")
@@ -616,6 +629,7 @@ class DataClient:
616
629
  method_name (str): The data capture method name.
617
630
  start_time (datetime): Optional start time for requesting a specific range of data.
618
631
  end_time (datetime): Optional end time for requesting a specific range of data.
632
+ additional_params (dict): Optional additional parameters of the resource that captured the data.
619
633
 
620
634
  Returns:
621
635
  List[TabularDataPoint]: The unified tabular data and metadata.
@@ -625,7 +639,12 @@ class DataClient:
625
639
 
626
640
  interval = CaptureInterval(start=datetime_to_timestamp(start_time), end=datetime_to_timestamp(end_time))
627
641
  request = ExportTabularDataRequest(
628
- part_id=part_id, resource_name=resource_name, resource_subtype=resource_api, method_name=method_name, interval=interval
642
+ part_id=part_id,
643
+ resource_name=resource_name,
644
+ resource_subtype=resource_api,
645
+ method_name=method_name,
646
+ interval=interval,
647
+ additional_parameters=dict_to_struct(additional_params) if additional_params is not None else None,
629
648
  )
630
649
  response: List[ExportTabularDataResponse] = await self._data_client.ExportTabularData(request, metadata=self._metadata)
631
650
 
@@ -812,7 +831,7 @@ class DataClient:
812
831
 
813
832
  Args:
814
833
  organization_id (str): The ID of the organization to delete the data from.
815
- To find your organization ID, visit the organization settings page in the Viam app.
834
+ To find your organization ID, visit the organization settings page.
816
835
  delete_older_than_days (int): Delete data that was captured up to *this many* days ago. For example, a value of
817
836
  10 deletes any data that was captured up to 10 days ago. A value of 0 deletes *all* existing data.
818
837
 
@@ -844,7 +863,7 @@ class DataClient:
844
863
  filter (~viam.proto.app.data.Filter): Optional, specifies binary data to delete.
845
864
  **CAUTION: Passing an empty** ``Filter`` **deletes all binary data!**
846
865
  You must specify an organization ID with ``organization_ids`` when using this option.
847
- To find your organization ID, visit the organization settings page in the Viam app.
866
+ To find your organization ID, visit the organization settings page.
848
867
 
849
868
  Returns:
850
869
  int: The number of items deleted.
@@ -1208,7 +1227,7 @@ class DataClient:
1208
1227
 
1209
1228
  Args:
1210
1229
  organization_id (str): The ID of the organization you'd like to connect to.
1211
- To find your organization ID, visit the organization settings page in the Viam app.
1230
+ To find your organization ID, visit the organization settings page.
1212
1231
 
1213
1232
  Returns:
1214
1233
  str: The hostname of the federated database.
@@ -1232,7 +1251,7 @@ class DataClient:
1232
1251
 
1233
1252
  Args:
1234
1253
  organization_id (str): The ID of the organization you'd like to configure a database user for.
1235
- To find your organization ID, visit the organization settings page in the Viam app.
1254
+ To find your organization ID, visit the organization settings page.
1236
1255
  password (str): The password of the user.
1237
1256
 
1238
1257
  For more information, see `Data Client API <https://docs.viam.com/dev/reference/apis/data-client/#configuredatabaseuser>`_.
@@ -1254,7 +1273,7 @@ class DataClient:
1254
1273
  Args:
1255
1274
  name (str): The name of the dataset being created.
1256
1275
  organization_id (str): The ID of the organization where the dataset is being created.
1257
- To find your organization ID, visit the organization settings page in the Viam app.
1276
+ To find your organization ID, visit the organization settings page.
1258
1277
 
1259
1278
  Returns:
1260
1279
  str: The dataset ID of the created dataset.
@@ -1305,7 +1324,7 @@ class DataClient:
1305
1324
 
1306
1325
  Args:
1307
1326
  organization_id (str): The ID of the organization you'd like to retrieve datasets from.
1308
- To find your organization ID, visit the organization settings page in the Viam app.
1327
+ To find your organization ID, visit the organization settings page.
1309
1328
 
1310
1329
  Returns:
1311
1330
  Sequence[Dataset]: The list of datasets in the organization.
@@ -1470,7 +1489,7 @@ class DataClient:
1470
1489
  """Upload binary sensor data.
1471
1490
 
1472
1491
  Upload binary data collected on a robot through a specific component (for example, a motor), along with the relevant metadata.
1473
- Binary data can be found on the **DATA** page of the Viam app.
1492
+ Binary data can be found on the **DATA** page.
1474
1493
 
1475
1494
  ::
1476
1495
 
@@ -1878,7 +1897,7 @@ class DataClient:
1878
1897
 
1879
1898
  Args:
1880
1899
  organization_id (str): The ID of the organization that owns the pipelines.
1881
- You can obtain your organization ID from the Viam app's organization settings page.
1900
+ You can obtain your organization ID from the organization settings page.
1882
1901
 
1883
1902
  Returns:
1884
1903
  List[DataPipeline]: A list of all of the data pipelines for the given organization.
@@ -1893,6 +1912,7 @@ class DataClient:
1893
1912
  name: str,
1894
1913
  mql_binary: List[Dict[str, Any]],
1895
1914
  schedule: str,
1915
+ enable_backfill: bool,
1896
1916
  data_source_type: TabularDataSourceType.ValueType = TabularDataSourceType.TABULAR_DATA_SOURCE_TYPE_STANDARD,
1897
1917
  ) -> str:
1898
1918
  """Create a new data pipeline.
@@ -1909,11 +1929,12 @@ class DataClient:
1909
1929
 
1910
1930
  Args:
1911
1931
  organization_id (str): The ID of the organization that will own the pipeline.
1912
- You can obtain your organization ID from the Viam app's organization settings page.
1932
+ You can obtain your organization ID from the organization settings page.
1913
1933
  name (str): The name of the pipeline.
1914
1934
  mql_binary (List[Dict[str, Any]]):The MQL pipeline to run, as a list of MongoDB aggregation pipeline stages.
1915
1935
  schedule (str): A cron expression representing the expected execution schedule in UTC (note this also
1916
1936
  defines the input time window; an hourly schedule would process 1 hour of data at a time).
1937
+ enable_backfill (bool): When true, pipeline runs will be scheduled for the organization's past data.
1917
1938
  data_source_type (TabularDataSourceType): The type of data source to use for the pipeline.
1918
1939
  Defaults to TabularDataSourceType.TABULAR_DATA_SOURCE_TYPE_STANDARD.
1919
1940
 
@@ -1922,7 +1943,12 @@ class DataClient:
1922
1943
  """
1923
1944
  binary: List[bytes] = [bson.encode(query) for query in mql_binary]
1924
1945
  request = CreateDataPipelineRequest(
1925
- organization_id=organization_id, name=name, mql_binary=binary, schedule=schedule, data_source_type=data_source_type
1946
+ organization_id=organization_id,
1947
+ name=name,
1948
+ mql_binary=binary,
1949
+ schedule=schedule,
1950
+ enable_backfill=enable_backfill,
1951
+ data_source_type=data_source_type,
1926
1952
  )
1927
1953
  response: CreateDataPipelineResponse = await self._data_pipelines_client.CreateDataPipeline(request, metadata=self._metadata)
1928
1954
  return response.id
viam/app/viam_client.py CHANGED
@@ -58,7 +58,7 @@ class ViamClient:
58
58
 
59
59
  @classmethod
60
60
  async def create_from_dial_options(cls, dial_options: DialOptions, app_url: Optional[str] = None) -> Self:
61
- """Create `ViamClient` that establishes a connection to the Viam app.
61
+ """Create `ViamClient` that establishes a connection to Viam.
62
62
 
63
63
  ::
64
64