Skip to content

Commit

Permalink
Update data_client.py (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Sep 26, 2024
1 parent 77e6c21 commit becf9d7
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/viam/app/data_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ async def tabular_data_by_filter(
::
from viam.utils import create_filter
my_data = []
my_filter = create_filter(component_name="motor-1")
last = None
Expand Down Expand Up @@ -330,7 +332,7 @@ async def binary_data_by_filter(
while True:
data, count, last = await data_client.binary_data_by_filter(
my_filter, limit=1, last=last)
my_filter, limit=1, last=last)
if not data:
break
my_data.extend(data)
Expand Down Expand Up @@ -496,7 +498,7 @@ async def delete_binary_data_by_filter(self, filter: Optional[Filter]) -> int:
Args:
filter (viam.proto.app.data.Filter): Optional `Filter` specifying binary data to delete. Passing an empty `Filter` will lead to
all data being deleted. Exercise caution when using this option. You must specify any organization ID with
all data being deleted. Exercise caution when using this option. You must specify an organization ID with
"organization_ids" when using this option.
Returns:
Expand Down Expand Up @@ -934,7 +936,7 @@ async def list_datasets_by_organization_id(self, organization_id: str) -> Sequen
::
datasets = await data_client.list_datasets_by_organization_id(
organization_id="YOUR-ORG-ID"
organization_id="<YOUR-ORG-ID>"
)
print(datasets)
Expand Down Expand Up @@ -966,7 +968,7 @@ async def rename_dataset(self, id: str, name: str) -> None:
Args:
id (str): The ID of the dataset. You can retrieve this by navigating to the **DATASETS** sub-tab of the **DATA** tab,
clicking on the dataset, clicking the **...** menu and selecting **Copy dataset ID**.
clicking on the dataset, clicking the **...** menu and selecting **Copy dataset ID**.
name (str): The new name of the dataset.
For more information, see `Data Client API <https://docs.viam.com/appendix/apis/data-client/>`_.
Expand All @@ -980,12 +982,12 @@ async def delete_dataset(self, id: str) -> None:
::
await data_client.delete_dataset(
id="abcd-1234xyz-8765z-123abc"
id="<YOUR-DATASET-ID>"
)
Args:
id (str): The ID of the dataset. You can retrieve this by navigating to the **DATASETS** sub-tab of the **DATA** tab,
clicking on the dataset, clicking the **...** menu and selecting **Copy dataset ID**.
clicking on the dataset, clicking the **...** menu and selecting **Copy dataset ID**.
For more information, see `Data Client API <https://docs.viam.com/appendix/apis/data-client/>`_.
"""
Expand Down

0 comments on commit becf9d7

Please sign in to comment.