viam.app.data_client

Attributes

ValueTypes

Types that can be encoded into a protobuf Value

LOGGER

Classes

AddBinaryDataToDatasetByIDsRequest

AddBinaryDataToDatasetByIDsRequest adds the binary data with the given binary IDs to a dataset with dataset_id.

AddBoundingBoxToImageByIDRequest

AddBoundingBoxToImageByIDRequest specifies the binary ID to which a bounding box

AddBoundingBoxToImageByIDResponse

AddBoundingBoxToImageByIDResponse returns the bounding box ID of the successfully added bounding box.

AddTagsToBinaryDataByFilterRequest

AddTagsToBinaryDataByFilterRequest requests adding all specified tags to each of the files when a filter is provided.

AddTagsToBinaryDataByIDsRequest

AddTagsToBinaryDataByIDsRequest requests adding all specified tags to each of the files when binary ids are provided.

BinaryData

BinaryData contains data and metadata associated with binary data.

BinaryDataByFilterRequest

BinaryDataByFilterRequest requests the data and metadata of binary (image + file) data when a filter is provided.

BinaryDataByFilterResponse

BinaryDataByFilterResponse provides the data and metadata of binary (image + file) data when a filter is provided.

BinaryDataByIDsRequest

BinaryDataByFilterRequest requests the data and metadata of binary (image + file) data by binary ids.

BinaryDataByIDsResponse

BinaryDataByIDsResponse provides the data and metadata of binary (image + file) data when a filter is provided.

BinaryID

BinaryID is the unique identifier for a file that one can request to be retrieved or modified.

BoundingBoxLabelsByFilterRequest

BoundingBoxLabelsByFilterRequest requests all the labels of the bounding boxes from files from a given filter.

BoundingBoxLabelsByFilterResponse

BoundingBoxLabelsByFilterRequest returns all the labels of the bounding boxes from files from a given filter.

CaptureMetadata

CaptureMetadata contains information on the settings used for the data capture.

ConfigureDatabaseUserRequest

ConfigureDatabaseUserRequest accepts a Viam organization ID and a password for the database user

DataRequest

DataRequest encapsulates the filter for the data, a limit on the maximum results returned,

DataServiceStub

DeleteBinaryDataByFilterRequest

DeleteBinaryDataByFilterRequest deletes the data and metadata of binary data when a filter is provided.

DeleteBinaryDataByFilterResponse

DeleteBinaryDataByFilterResponse returns the number of binary files deleted when a filter is provided.

DeleteBinaryDataByIDsRequest

DeleteBinaryDataByIDsRequest deletes the data and metadata of binary data when binary ids are provided.

DeleteBinaryDataByIDsResponse

DeleteBinaryDataByIDsResponse returns the number of binary files deleted when binary ids are provided.

DeleteTabularDataRequest

DeleteTabularDataRequest deletes the data from the organization that is older than delete_older_than_days.

DeleteTabularDataResponse

DeleteBinaryDataResponse returns the number of tabular datapoints deleted.

Filter

Filter defines the fields over which we can filter data using a logic AND.

GetDatabaseConnectionRequest

GetDatabaseConnectionRequest requests the database connection hostname.

GetDatabaseConnectionResponse

GetDatabaseConnectionResponse returns the database connection hostname endpoint. It also returns

Order

Order specifies the order in which data is returned.

RemoveBinaryDataFromDatasetByIDsRequest

RemoveBinaryDataFromDatasetByIDsRequest removes the specified binary IDs from a dataset with dataset_id.

RemoveBoundingBoxFromImageByIDRequest

RemoveBoundingBoxFromImageByIDRequest removes the bounding box with specified bbox ID for the file represented by the binary id.

RemoveTagsFromBinaryDataByFilterRequest

RemoveTagsFromBinaryDataByFilterRequest requests removing the given tags value from each file when a filter is provided.

RemoveTagsFromBinaryDataByFilterResponse

RemoveTagsFromBinaryDataByFilterResponse returns the number of binary files which had tags removed.

RemoveTagsFromBinaryDataByIDsRequest

RemoveTagsFromBinaryDataByIDsRequest requests removing the given tags value from each file when binary ids are provided.

RemoveTagsFromBinaryDataByIDsResponse

RemoveTagsFromBinaryDataByIDsResponse returns the number of binary files which had tags removed

TabularDataByFilterRequest

TabularDataByFilterRequest requests tabular data based on filter values.

TabularDataByFilterResponse

TabularDataByFilterResponse provides the data and metadata of tabular data.

TabularDataByMQLRequest

TabularDataByMQLRequest requests tabular data using an MQL query.

TabularDataByMQLResponse

TabularDataByMQLResponse provides unified tabular data and metadata, queried with MQL.

TabularDataBySQLRequest

TabularDataBySQLRequest requests tabular data using a SQL query.

TabularDataBySQLResponse

TabularDataBySQLResponse provides unified tabular data and metadata, queried with SQL.

TagsByFilterRequest

TagsByFilterRequest requests the unique tags from data based on given filter.

TagsByFilterResponse

TagsByFilterResponse returns the unique tags from data based on given filter.

CreateDatasetRequest

CreateDatasetRequest defines the name and organization ID of a dataset.

CreateDatasetResponse

CreateDatasetResponse returns the dataset ID of the created dataset.

Dataset

Dataset stores the metadata of a dataset.

DatasetServiceStub

DeleteDatasetRequest

DeleteDatasetRequest deletes the dataset specified by the dataset ID.

ListDatasetsByIDsRequest

ListDatasetsByIDsRequest requests all of the datasets by their dataset IDs.

ListDatasetsByIDsResponse

ListDatasetsByIDsResponse returns all the dataset metadata for the associated dataset IDs.

ListDatasetsByOrganizationIDRequest

ListDatasetsByOrganizationIDRequest requests all of the datasets for an organization.

ListDatasetsByOrganizationIDResponse

ListDatasetsByOrganizationIDResponse returns all the dataset metadata for the organization.

RenameDatasetRequest

RenameDatasetRequest applies the new name to the dataset specified by the dataset ID.

DataCaptureUploadMetadata

DataCaptureUploadMetadata contains the metadata for streaming binary (image + file) data.

DataCaptureUploadRequest

DataCaptureUploadRequest requests to upload the contents and metadata for tabular data.

DataCaptureUploadResponse

DataCaptureUploadResponse returns the file id of the uploaded contents and metadata for tabular data.

DataSyncServiceStub

DataType

DataType specifies the type of data uploaded.

FileData

FileData contains the contents of binary (image + file) data.

FileUploadRequest

FileUploadRequest requests to upload the contents and metadata for binary (image + file) data.

FileUploadResponse

FileUploadResponse returns the file id of the uploaded contents and metadata for binary (image + file) data.

SensorData

SensorData contains the contents and metadata for tabular data.

SensorMetadata

SensorMetadata contains the time the sensor data was requested and was received.

StreamingDataCaptureUploadRequest

StreamingDataCaptureUploadRequest requests to upload the contents and metadata for streaming binary (image + file) data.

StreamingDataCaptureUploadResponse

StreamingDataCaptureUploadResponse returns the file id of the uploaded contents and metadata for streaming binary (image + file) data.

UploadMetadata

UploadMetadata contains the metadata for binary (image + file) data.

DataClient

gRPC client for uploading and retrieving data from app.

Functions

create_filter(→ viam.proto.app.data.Filter)

Create a Filter.

datetime_to_timestamp(...)

struct_to_dict(→ Dict[str, ValueTypes])

Module Contents

class viam.app.data_client.AddBinaryDataToDatasetByIDsRequest(*, binary_ids: collections.abc.Iterable[global___BinaryID] | None = ..., dataset_id: str = ...)

Bases: google.protobuf.message.Message

AddBinaryDataToDatasetByIDsRequest adds the binary data with the given binary IDs to a dataset with dataset_id.

dataset_id: str
property binary_ids: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinaryID]
class viam.app.data_client.AddBoundingBoxToImageByIDRequest(*, binary_id: global___BinaryID | None = ..., label: str = ..., x_min_normalized: float = ..., y_min_normalized: float = ..., x_max_normalized: float = ..., y_max_normalized: float = ...)

Bases: google.protobuf.message.Message

AddBoundingBoxToImageByIDRequest specifies the binary ID to which a bounding box with the associated label and position in normalized coordinates will be added.

label: str
x_min_normalized: float
y_min_normalized: float
x_max_normalized: float
y_max_normalized: float
property binary_id: global___BinaryID
HasField(field_name: Literal['binary_id', b'binary_id']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.AddBoundingBoxToImageByIDResponse(*, bbox_id: str = ...)

Bases: google.protobuf.message.Message

AddBoundingBoxToImageByIDResponse returns the bounding box ID of the successfully added bounding box.

bbox_id: str
class viam.app.data_client.AddTagsToBinaryDataByFilterRequest(*, filter: global___Filter | None = ..., tags: collections.abc.Iterable[str] | None = ...)

Bases: google.protobuf.message.Message

AddTagsToBinaryDataByFilterRequest requests adding all specified tags to each of the files when a filter is provided.

property filter: global___Filter
property tags: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
HasField(field_name: Literal['filter', b'filter']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.AddTagsToBinaryDataByIDsRequest(*, binary_ids: collections.abc.Iterable[global___BinaryID] | None = ..., tags: collections.abc.Iterable[str] | None = ...)

Bases: google.protobuf.message.Message

AddTagsToBinaryDataByIDsRequest requests adding all specified tags to each of the files when binary ids are provided.

property binary_ids: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinaryID]
property tags: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
class viam.app.data_client.BinaryData(*, binary: bytes = ..., metadata: global___BinaryMetadata | None = ...)

Bases: google.protobuf.message.Message

BinaryData contains data and metadata associated with binary data.

binary: bytes
property metadata: global___BinaryMetadata
HasField(field_name: Literal['metadata', b'metadata']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.BinaryDataByFilterRequest(*, data_request: global___DataRequest | None = ..., include_binary: bool = ..., count_only: bool = ..., include_internal_data: bool = ...)

Bases: google.protobuf.message.Message

BinaryDataByFilterRequest requests the data and metadata of binary (image + file) data when a filter is provided.

include_binary: bool
count_only: bool
include_internal_data: bool
property data_request: global___DataRequest
HasField(field_name: Literal['data_request', b'data_request']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.BinaryDataByFilterResponse(*, data: collections.abc.Iterable[global___BinaryData] | None = ..., count: int = ..., last: str = ..., total_size_bytes: int = ...)

Bases: google.protobuf.message.Message

BinaryDataByFilterResponse provides the data and metadata of binary (image + file) data when a filter is provided.

count: int
last: str
total_size_bytes: int
property data: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinaryData]
class viam.app.data_client.BinaryDataByIDsRequest(*, include_binary: bool = ..., binary_ids: collections.abc.Iterable[global___BinaryID] | None = ...)

Bases: google.protobuf.message.Message

BinaryDataByFilterRequest requests the data and metadata of binary (image + file) data by binary ids.

include_binary: bool
property binary_ids: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinaryID]
class viam.app.data_client.BinaryDataByIDsResponse(*, data: collections.abc.Iterable[global___BinaryData] | None = ..., count: int = ...)

Bases: google.protobuf.message.Message

BinaryDataByIDsResponse provides the data and metadata of binary (image + file) data when a filter is provided.

count: int
property data: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinaryData]
class viam.app.data_client.BinaryID(*, file_id: str = ..., organization_id: str = ..., location_id: str = ...)

Bases: google.protobuf.message.Message

BinaryID is the unique identifier for a file that one can request to be retrieved or modified.

file_id: str
organization_id: str
location_id: str
class viam.app.data_client.BoundingBoxLabelsByFilterRequest(*, filter: global___Filter | None = ...)

Bases: google.protobuf.message.Message

BoundingBoxLabelsByFilterRequest requests all the labels of the bounding boxes from files from a given filter.

property filter: global___Filter
HasField(field_name: Literal['filter', b'filter']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.BoundingBoxLabelsByFilterResponse(*, labels: collections.abc.Iterable[str] | None = ...)

Bases: google.protobuf.message.Message

BoundingBoxLabelsByFilterRequest returns all the labels of the bounding boxes from files from a given filter.

property labels: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
class viam.app.data_client.CaptureMetadata(*, organization_id: str = ..., location_id: str = ..., robot_name: str = ..., robot_id: str = ..., part_name: str = ..., part_id: str = ..., component_type: str = ..., component_name: str = ..., method_name: str = ..., method_parameters: collections.abc.Mapping[str, google.protobuf.any_pb2.Any] | None = ..., tags: collections.abc.Iterable[str] | None = ..., mime_type: str = ...)

Bases: google.protobuf.message.Message

CaptureMetadata contains information on the settings used for the data capture.

class MethodParametersEntry(*, key: str = ..., value: google.protobuf.any_pb2.Any | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

key: str
property value: google.protobuf.any_pb2.Any
HasField(field_name: Literal['value', b'value']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

organization_id: str
location_id: str
robot_name: str
robot_id: str
part_name: str
part_id: str
component_type: str
component_name: str
method_name: str
mime_type: str
property method_parameters: google.protobuf.internal.containers.MessageMap[str, google.protobuf.any_pb2.Any]
property tags: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
class viam.app.data_client.ConfigureDatabaseUserRequest(*, organization_id: str = ..., password: str = ...)

Bases: google.protobuf.message.Message

ConfigureDatabaseUserRequest accepts a Viam organization ID and a password for the database user being configured. Viam uses gRPC over TLS, so the entire request will be encrypted while in flight, including the password.

organization_id: str
password: str
class viam.app.data_client.DataRequest(*, filter: global___Filter | None = ..., limit: int = ..., last: str = ..., sort_order: global___Order = ...)

Bases: google.protobuf.message.Message

DataRequest encapsulates the filter for the data, a limit on the maximum results returned, a last string associated with the last returned document, and the sorting order by time. last is returned in the responses TabularDataByFilterResponse and BinaryDataByFilterResponse from the API calls TabularDataByFilter and BinaryDataByFilter, respectively. We can then use the last string from the previous API calls in the subsequent request to get the next set of ordered documents.

limit: int
last: str
sort_order: global___Order
property filter: global___Filter
HasField(field_name: Literal['filter', b'filter']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.DataServiceStub(channel: grpclib.client.Channel)[source]
class viam.app.data_client.DeleteBinaryDataByFilterRequest(*, filter: global___Filter | None = ..., include_internal_data: bool = ...)

Bases: google.protobuf.message.Message

DeleteBinaryDataByFilterRequest deletes the data and metadata of binary data when a filter is provided.

include_internal_data: bool
property filter: global___Filter
HasField(field_name: Literal['filter', b'filter']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.DeleteBinaryDataByFilterResponse(*, deleted_count: int = ...)

Bases: google.protobuf.message.Message

DeleteBinaryDataByFilterResponse returns the number of binary files deleted when a filter is provided.

deleted_count: int
class viam.app.data_client.DeleteBinaryDataByIDsRequest(*, binary_ids: collections.abc.Iterable[global___BinaryID] | None = ...)

Bases: google.protobuf.message.Message

DeleteBinaryDataByIDsRequest deletes the data and metadata of binary data when binary ids are provided.

property binary_ids: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinaryID]
class viam.app.data_client.DeleteBinaryDataByIDsResponse(*, deleted_count: int = ...)

Bases: google.protobuf.message.Message

DeleteBinaryDataByIDsResponse returns the number of binary files deleted when binary ids are provided.

deleted_count: int
class viam.app.data_client.DeleteTabularDataRequest(*, organization_id: str = ..., delete_older_than_days: int = ...)

Bases: google.protobuf.message.Message

DeleteTabularDataRequest deletes the data from the organization that is older than delete_older_than_days. For example if delete_older_than_days is 10, this deletes any data that was captured up to 10 days ago. If it is 0, all existing data is deleted.

organization_id: str
delete_older_than_days: int
class viam.app.data_client.DeleteTabularDataResponse(*, deleted_count: int = ...)

Bases: google.protobuf.message.Message

DeleteBinaryDataResponse returns the number of tabular datapoints deleted.

deleted_count: int
class viam.app.data_client.Filter(*, component_name: str = ..., component_type: str = ..., method: str = ..., robot_name: str = ..., robot_id: str = ..., part_name: str = ..., part_id: str = ..., location_ids: collections.abc.Iterable[str] | None = ..., organization_ids: collections.abc.Iterable[str] | None = ..., mime_type: collections.abc.Iterable[str] | None = ..., interval: global___CaptureInterval | None = ..., tags_filter: global___TagsFilter | None = ..., bbox_labels: collections.abc.Iterable[str] | None = ..., dataset_id: str = ...)

Bases: google.protobuf.message.Message

Filter defines the fields over which we can filter data using a logic AND. For example, if component_type and robot_id are specified, only data from that robot_id of type component_type is returned. However, we logical OR over the specified tags and bounding box labels, such that if component_type, robot_id, tagA, tagB are specified, we return data from that robot_id of type component_type with tagA or tagB.

component_name: str
component_type: str
method: str
robot_name: str
robot_id: str
part_name: str
part_id: str
dataset_id: str
property location_ids: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
property organization_ids: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
property mime_type: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
property interval: global___CaptureInterval
property tags_filter: global___TagsFilter
property bbox_labels: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]

bbox_labels are used to match documents with the specified bounding box labels (using logical OR).

HasField(field_name: Literal['interval', b'interval', 'tags_filter', b'tags_filter']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.GetDatabaseConnectionRequest(*, organization_id: str = ...)

Bases: google.protobuf.message.Message

GetDatabaseConnectionRequest requests the database connection hostname.

organization_id: str
class viam.app.data_client.GetDatabaseConnectionResponse(*, hostname: str = ..., mongodb_uri: str = ..., has_database_user: bool = ...)

Bases: google.protobuf.message.Message

GetDatabaseConnectionResponse returns the database connection hostname endpoint. It also returns a URI that can be used to connect to the database instance through MongoDB clients, as well as information on whether the Viam organization has a database user configured.

hostname: str
mongodb_uri: str
has_database_user: bool
class viam.app.data_client.Order

Bases: _Order

Order specifies the order in which data is returned.

class viam.app.data_client.RemoveBinaryDataFromDatasetByIDsRequest(*, binary_ids: collections.abc.Iterable[global___BinaryID] | None = ..., dataset_id: str = ...)

Bases: google.protobuf.message.Message

RemoveBinaryDataFromDatasetByIDsRequest removes the specified binary IDs from a dataset with dataset_id.

dataset_id: str
property binary_ids: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinaryID]
class viam.app.data_client.RemoveBoundingBoxFromImageByIDRequest(*, binary_id: global___BinaryID | None = ..., bbox_id: str = ...)

Bases: google.protobuf.message.Message

RemoveBoundingBoxFromImageByIDRequest removes the bounding box with specified bbox ID for the file represented by the binary id.

bbox_id: str
property binary_id: global___BinaryID
HasField(field_name: Literal['binary_id', b'binary_id']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.RemoveTagsFromBinaryDataByFilterRequest(*, filter: global___Filter | None = ..., tags: collections.abc.Iterable[str] | None = ...)

Bases: google.protobuf.message.Message

RemoveTagsFromBinaryDataByFilterRequest requests removing the given tags value from each file when a filter is provided.

property filter: global___Filter
property tags: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
HasField(field_name: Literal['filter', b'filter']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.RemoveTagsFromBinaryDataByFilterResponse(*, deleted_count: int = ...)

Bases: google.protobuf.message.Message

RemoveTagsFromBinaryDataByFilterResponse returns the number of binary files which had tags removed.

deleted_count: int
class viam.app.data_client.RemoveTagsFromBinaryDataByIDsRequest(*, binary_ids: collections.abc.Iterable[global___BinaryID] | None = ..., tags: collections.abc.Iterable[str] | None = ...)

Bases: google.protobuf.message.Message

RemoveTagsFromBinaryDataByIDsRequest requests removing the given tags value from each file when binary ids are provided.

property binary_ids: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___BinaryID]
property tags: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
class viam.app.data_client.RemoveTagsFromBinaryDataByIDsResponse(*, deleted_count: int = ...)

Bases: google.protobuf.message.Message

RemoveTagsFromBinaryDataByIDsResponse returns the number of binary files which had tags removed

deleted_count: int
class viam.app.data_client.TabularDataByFilterRequest(*, data_request: global___DataRequest | None = ..., count_only: bool = ..., include_internal_data: bool = ...)

Bases: google.protobuf.message.Message

TabularDataByFilterRequest requests tabular data based on filter values.

count_only: bool
include_internal_data: bool
property data_request: global___DataRequest
HasField(field_name: Literal['data_request', b'data_request']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.TabularDataByFilterResponse(*, metadata: collections.abc.Iterable[global___CaptureMetadata] | None = ..., data: collections.abc.Iterable[global___TabularData] | None = ..., count: int = ..., last: str = ..., total_size_bytes: int = ...)

Bases: google.protobuf.message.Message

TabularDataByFilterResponse provides the data and metadata of tabular data.

count: int
last: str
total_size_bytes: int
property metadata: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___CaptureMetadata]
property data: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___TabularData]
class viam.app.data_client.TabularDataByMQLRequest(*, organization_id: str = ..., mql_binary: collections.abc.Iterable[bytes] | None = ...)

Bases: google.protobuf.message.Message

TabularDataByMQLRequest requests tabular data using an MQL query.

organization_id: str
property mql_binary: google.protobuf.internal.containers.RepeatedScalarFieldContainer[bytes]

mql_binary accepts a MongoDB aggregation pipeline as a list of BSON documents, where each document is one stage in the pipeline. The pipeline is run on the “sensorData.readings” namespace, which holds the Viam organization’s tabular data.

class viam.app.data_client.TabularDataByMQLResponse(*, data: collections.abc.Iterable[google.protobuf.struct_pb2.Struct] | None = ...)

Bases: google.protobuf.message.Message

TabularDataByMQLResponse provides unified tabular data and metadata, queried with MQL.

property data: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.struct_pb2.Struct]
class viam.app.data_client.TabularDataBySQLRequest(*, organization_id: str = ..., sql_query: str = ...)

Bases: google.protobuf.message.Message

TabularDataBySQLRequest requests tabular data using a SQL query.

organization_id: str
sql_query: str

sql_query accepts any valid SQL SELECT statement. Tabular data is held in a database called “sensorData” and a table called readings, so queries should select from “readings” or “sensorData.readings”.

class viam.app.data_client.TabularDataBySQLResponse(*, data: collections.abc.Iterable[google.protobuf.struct_pb2.Struct] | None = ...)

Bases: google.protobuf.message.Message

TabularDataBySQLResponse provides unified tabular data and metadata, queried with SQL.

property data: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[google.protobuf.struct_pb2.Struct]
class viam.app.data_client.TagsByFilterRequest(*, filter: global___Filter | None = ...)

Bases: google.protobuf.message.Message

TagsByFilterRequest requests the unique tags from data based on given filter.

property filter: global___Filter
HasField(field_name: Literal['filter', b'filter']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.TagsByFilterResponse(*, tags: collections.abc.Iterable[str] | None = ...)

Bases: google.protobuf.message.Message

TagsByFilterResponse returns the unique tags from data based on given filter.

property tags: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
class viam.app.data_client.CreateDatasetRequest(*, name: str = ..., organization_id: str = ...)

Bases: google.protobuf.message.Message

CreateDatasetRequest defines the name and organization ID of a dataset.

name: str
organization_id: str
class viam.app.data_client.CreateDatasetResponse(*, id: str = ...)

Bases: google.protobuf.message.Message

CreateDatasetResponse returns the dataset ID of the created dataset.

id: str
class viam.app.data_client.Dataset(*, id: str = ..., name: str = ..., organization_id: str = ..., time_created: google.protobuf.timestamp_pb2.Timestamp | None = ...)

Bases: google.protobuf.message.Message

Dataset stores the metadata of a dataset.

id: str
name: str
organization_id: str
property time_created: google.protobuf.timestamp_pb2.Timestamp
HasField(field_name: Literal['time_created', b'time_created']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.DatasetServiceStub(channel: grpclib.client.Channel)[source]
class viam.app.data_client.DeleteDatasetRequest(*, id: str = ...)

Bases: google.protobuf.message.Message

DeleteDatasetRequest deletes the dataset specified by the dataset ID.

id: str
class viam.app.data_client.ListDatasetsByIDsRequest(*, ids: collections.abc.Iterable[str] | None = ...)

Bases: google.protobuf.message.Message

ListDatasetsByIDsRequest requests all of the datasets by their dataset IDs.

property ids: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
class viam.app.data_client.ListDatasetsByIDsResponse(*, datasets: collections.abc.Iterable[global___Dataset] | None = ...)

Bases: google.protobuf.message.Message

ListDatasetsByIDsResponse returns all the dataset metadata for the associated dataset IDs.

property datasets: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Dataset]
class viam.app.data_client.ListDatasetsByOrganizationIDRequest(*, organization_id: str = ...)

Bases: google.protobuf.message.Message

ListDatasetsByOrganizationIDRequest requests all of the datasets for an organization.

organization_id: str
class viam.app.data_client.ListDatasetsByOrganizationIDResponse(*, datasets: collections.abc.Iterable[global___Dataset] | None = ...)

Bases: google.protobuf.message.Message

ListDatasetsByOrganizationIDResponse returns all the dataset metadata for the organization.

property datasets: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___Dataset]
class viam.app.data_client.RenameDatasetRequest(*, id: str = ..., name: str = ...)

Bases: google.protobuf.message.Message

RenameDatasetRequest applies the new name to the dataset specified by the dataset ID.

id: str
name: str
class viam.app.data_client.DataCaptureUploadMetadata(*, upload_metadata: global___UploadMetadata | None = ..., sensor_metadata: global___SensorMetadata | None = ...)

Bases: google.protobuf.message.Message

DataCaptureUploadMetadata contains the metadata for streaming binary (image + file) data.

property upload_metadata: global___UploadMetadata
property sensor_metadata: global___SensorMetadata
HasField(field_name: Literal['sensor_metadata', b'sensor_metadata', 'upload_metadata', b'upload_metadata']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.DataCaptureUploadRequest(*, metadata: global___UploadMetadata | None = ..., sensor_contents: collections.abc.Iterable[global___SensorData] | None = ...)

Bases: google.protobuf.message.Message

DataCaptureUploadRequest requests to upload the contents and metadata for tabular data.

property metadata: global___UploadMetadata
property sensor_contents: google.protobuf.internal.containers.RepeatedCompositeFieldContainer[global___SensorData]
HasField(field_name: Literal['metadata', b'metadata']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.DataCaptureUploadResponse(*, file_id: str = ...)

Bases: google.protobuf.message.Message

DataCaptureUploadResponse returns the file id of the uploaded contents and metadata for tabular data.

file_id: str
class viam.app.data_client.DataSyncServiceStub(channel: grpclib.client.Channel)[source]
class viam.app.data_client.DataType

Bases: _DataType

DataType specifies the type of data uploaded.

class viam.app.data_client.FileData(*, data: bytes = ...)

Bases: google.protobuf.message.Message

FileData contains the contents of binary (image + file) data.

data: bytes
class viam.app.data_client.FileUploadRequest(*, metadata: global___UploadMetadata | None = ..., file_contents: global___FileData | None = ...)

Bases: google.protobuf.message.Message

FileUploadRequest requests to upload the contents and metadata for binary (image + file) data. The first packet must be the UploadMetadata associated with the binary data.

property metadata: global___UploadMetadata
property file_contents: global___FileData
HasField(field_name: Literal['file_contents', b'file_contents', 'metadata', b'metadata', 'upload_packet', b'upload_packet']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

WhichOneof(oneof_group: Literal['upload_packet', b'upload_packet']) Literal['metadata', 'file_contents'] | None

Returns the name of the field that is set inside a oneof group.

If no field is set, returns None.

Parameters:

oneof_group (str) – the name of the oneof group to check.

Returns:

The name of the group that is set, or None.

Return type:

str or None

Raises:

ValueError – no group with the given name exists

class viam.app.data_client.FileUploadResponse(*, file_id: str = ...)

Bases: google.protobuf.message.Message

FileUploadResponse returns the file id of the uploaded contents and metadata for binary (image + file) data.

file_id: str
class viam.app.data_client.SensorData(*, metadata: global___SensorMetadata | None = ..., struct: google.protobuf.struct_pb2.Struct | None = ..., binary: bytes = ...)

Bases: google.protobuf.message.Message

SensorData contains the contents and metadata for tabular data.

binary: bytes
property metadata: global___SensorMetadata
property struct: google.protobuf.struct_pb2.Struct
HasField(field_name: Literal['binary', b'binary', 'data', b'data', 'metadata', b'metadata', 'struct', b'struct']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

WhichOneof(oneof_group: Literal['data', b'data']) Literal['struct', 'binary'] | None

Returns the name of the field that is set inside a oneof group.

If no field is set, returns None.

Parameters:

oneof_group (str) – the name of the oneof group to check.

Returns:

The name of the group that is set, or None.

Return type:

str or None

Raises:

ValueError – no group with the given name exists

class viam.app.data_client.SensorMetadata(*, time_requested: google.protobuf.timestamp_pb2.Timestamp | None = ..., time_received: google.protobuf.timestamp_pb2.Timestamp | None = ...)

Bases: google.protobuf.message.Message

SensorMetadata contains the time the sensor data was requested and was received.

property time_requested: google.protobuf.timestamp_pb2.Timestamp
property time_received: google.protobuf.timestamp_pb2.Timestamp
HasField(field_name: Literal['time_received', b'time_received', 'time_requested', b'time_requested']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

class viam.app.data_client.StreamingDataCaptureUploadRequest(*, metadata: global___DataCaptureUploadMetadata | None = ..., data: bytes = ...)

Bases: google.protobuf.message.Message

StreamingDataCaptureUploadRequest requests to upload the contents and metadata for streaming binary (image + file) data. The first packet must be the DataCaptureUploadMetadata associated with the data.

data: bytes
property metadata: global___DataCaptureUploadMetadata
HasField(field_name: Literal['data', b'data', 'metadata', b'metadata', 'upload_packet', b'upload_packet']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

WhichOneof(oneof_group: Literal['upload_packet', b'upload_packet']) Literal['metadata', 'data'] | None

Returns the name of the field that is set inside a oneof group.

If no field is set, returns None.

Parameters:

oneof_group (str) – the name of the oneof group to check.

Returns:

The name of the group that is set, or None.

Return type:

str or None

Raises:

ValueError – no group with the given name exists

class viam.app.data_client.StreamingDataCaptureUploadResponse(*, file_id: str = ...)

Bases: google.protobuf.message.Message

StreamingDataCaptureUploadResponse returns the file id of the uploaded contents and metadata for streaming binary (image + file) data.

file_id: str
class viam.app.data_client.UploadMetadata(*, part_id: str = ..., component_type: str = ..., component_name: str = ..., method_name: str = ..., type: global___DataType = ..., file_name: str = ..., method_parameters: collections.abc.Mapping[str, google.protobuf.any_pb2.Any] | None = ..., file_extension: str = ..., tags: collections.abc.Iterable[str] | None = ...)

Bases: google.protobuf.message.Message

UploadMetadata contains the metadata for binary (image + file) data.

class MethodParametersEntry(*, key: str = ..., value: google.protobuf.any_pb2.Any | None = ...)

Bases: google.protobuf.message.Message

Abstract base class for protocol messages.

Protocol message classes are almost always generated by the protocol compiler. These generated types subclass Message and implement the methods shown below.

key: str
property value: google.protobuf.any_pb2.Any
HasField(field_name: Literal['value', b'value']) bool

Checks if a certain field is set for the message.

For a oneof group, checks if any field inside is set. Note that if the field_name is not defined in the message descriptor, ValueError will be raised.

Parameters:

field_name (str) – The name of the field to check for presence.

Returns:

Whether a value has been set for the named field.

Return type:

bool

Raises:

ValueError – if the field_name is not a member of this message.

part_id: str
component_type: str
component_name: str
method_name: str
type: global___DataType
file_name: str
file_extension: str
property method_parameters: google.protobuf.internal.containers.MessageMap[str, google.protobuf.any_pb2.Any]
property tags: google.protobuf.internal.containers.RepeatedScalarFieldContainer[str]
viam.app.data_client.ValueTypes

Types that can be encoded into a protobuf Value

viam.app.data_client.create_filter(component_name: str | None = None, component_type: str | None = None, method: str | None = None, robot_name: str | None = None, robot_id: str | None = None, part_name: str | None = None, part_id: str | None = None, location_ids: List[str] | None = None, organization_ids: List[str] | None = None, mime_type: List[str] | None = None, start_time: datetime.datetime | None = None, end_time: datetime.datetime | None = None, tags: List[str] | None = None, bbox_labels: List[str] | None = None, dataset_id: str | None = None) viam.proto.app.data.Filter[source]

Create a Filter.

Parameters:
  • component_name (Optional[str]) – Optional name of the component that captured the data being filtered (for example, “left_motor”).

  • component_type (Optional[str]) – Optional type of the componenet that captured the data being filtered (for example, “motor”).

  • method (Optional[str]) – Optional name of the method used to capture the data being filtered (for example, “IsPowered”).

  • robot_name (Optional[str]) – Optional name of the robot associated with the data being filtered (for example, “viam_rover_1”).

  • robot_id (Optional[str]) – Optional ID of the robot associated with the data being filtered.

  • part_name (Optional[str]) – Optional name of the system part associated with the data being filtered (for example, “viam_rover_1-main”).

  • part_id (Optional[str]) – Optional ID of the system part associated with the data being filtered.

  • location_ids (Optional[List[str]]) – Optional list of location IDs associated with the data being filtered.

  • organization_ids (Optional[List[str]]) – Optional list of organization IDs associated with the data being filtered.

  • mime_type (Optional[List[str]]) – Optional mime type of data being filtered (for example, “image/png”).

  • start_time (Optional[datetime.datetime]) – Optional start time of an interval to filter data by.

  • end_time (Optional[datetime.datetime]) – Optional end time of an interval to filter data by.

  • tags (Optional[List[str]]) – Optional list of tags attached to the data being filtered (for example, [“test”]).

  • bbox_labels (Optional[List[str]]) – Optional list of bounding box labels attached to the data being filtered (for example, [“square”, “circle”]).

  • dataset_id (Optional[str]) – Optional ID of dataset associated with data being filtered

Returns:

The Filter object.

Return type:

viam.proto.app.data.Filter

viam.app.data_client.datetime_to_timestamp(dt: datetime.datetime | None) google.protobuf.timestamp_pb2.Timestamp | None[source]
viam.app.data_client.struct_to_dict(struct: google.protobuf.struct_pb2.Struct) Dict[str, ValueTypes][source]
viam.app.data_client.LOGGER
class viam.app.data_client.DataClient(channel: grpclib.client.Channel, metadata: Mapping[str, str])[source]

gRPC client for uploading and retrieving data from app.

Constructor is used by ViamClient to instantiate relevant service stubs. Calls to DataClient methods should be made through ViamClient.

Establish a Connection:

import asyncio

from viam.rpc.dial import DialOptions, Credentials
from viam.app.viam_client import ViamClient


async def connect() -> ViamClient:
    # Replace "<API-KEY>" (including brackets) with your API key and "<API-KEY-ID>" with your API key ID
    dial_options = DialOptions.with_api_key("<API-KEY>", "<API-KEY-ID>")
    return await ViamClient.create_from_dial_options(dial_options)


async def main():
    # Make a ViamClient
    viam_client = await connect()
    # Instantiate a DataClient to run data client API methods on
    data_client = viam_client.data_client

    viam_client.close()

if __name__ == '__main__':
    asyncio.run(main())

For more information, see Data Client API.

class TabularData[source]

Class representing a piece of tabular data and associated metadata.

data: Mapping[str, Any]

The requested data

metadata: viam.proto.app.data.CaptureMetadata

The metadata associated with the data

time_requested: datetime.datetime

The time the data were requested

time_received: datetime.datetime

The time the data were received

__str__() str[source]

Return str(self).

__eq__(other: object) bool[source]

Return self==value.

async tabular_data_by_filter(filter: viam.proto.app.data.Filter | None = None, limit: int | None = None, sort_order: viam.proto.app.data.Order.ValueType | None = None, last: str | None = None, count_only: bool = False, include_internal_data: bool = False, dest: str | None = None) Tuple[List[TabularData], int, str][source]

Filter and download tabular data. The data will be paginated into pages of limit items, and the pagination ID will be included in the returned tuple. If a destination is provided, the data will be saved to that file. If the file is not empty, it will be overwritten.

from viam.utils import create_filter

my_data = []
last = None
my_filter = create_filter(component_name="left_motor")
while True:
    tabular_data, count, last = await data_client.tabular_data_by_filter(my_filter, last)
    if not tabular_data:
        break
    my_data.extend(tabular_data)
Parameters:
  • filter (viam.proto.app.data.Filter) – Optional Filter specifying tabular data to retrieve. No Filter implies all tabular data.

  • limit (int) – The maximum number of entries to include in a page. Defaults to 50 if unspecified.

  • sort_order (viam.proto.app.data.Order) – The desired sort order of the data.

  • last (str) – Optional string indicating the ID of the last-returned data. If provided, the server will return the next data entries after the last ID.

  • count_only (bool) – Whether to return only the total count of entries.

  • include_internal_data (bool) – Whether to return the internal data. Internal data is used for Viam-specific data ingestion, like cloud SLAM. Defaults to False

  • dest (str) – Optional filepath for writing retrieved data.

Returns:

A tuple containing the following: List[TabularData]: The tabular data, int: The count (number of entries), str: The last-returned page ID.

Return type:

Tuple[List[TabularData], int, str]

For more information, see Data Client API.

async tabular_data_by_sql(organization_id: str, sql_query: str) List[Dict[str, viam.utils.ValueTypes]][source]

Obtain unified tabular data and metadata, queried with SQL.

data = await data_client.tabular_data_by_sql(org_id="<your-org-id>", sql_query="SELECT * FROM readings LIMIT 5")
Parameters:
  • organization_id (str) – The ID of the organization that owns the data. You can obtain your organization ID from the Viam app’s organization settings page.

  • sql_query (str) – The SQL query to run.

Returns:

An array of data objects.

Return type:

List[Dict[str, ValueTypes]]

For more information, see Data Client API.

async tabular_data_by_mql(organization_id: str, mql_binary: List[bytes]) List[Dict[str, viam.utils.ValueTypes]][source]

Obtain unified tabular data and metadata, queried with MQL.

# using bson
import bson
tabular_data = await data_client.tabular_data_by_mql(org_id="<your-org-id>", mql_binary=[
    bson.dumps({ '$match': { 'location_id': '<location-id>' } }),
    bson.dumps({ "$limit": 5 })
])

# using pymongo
import bson
tabular_data = await data_client.tabular_data_by_mql(org_id="<your-org-id>", mql_binary=[
    bson.encode({ '$match': { 'location_id': '<location-id>' } }),
    bson.encode({ "$limit": 5 })
])
Parameters:
  • organization_id (str) – The ID of the organization that owns the data. You can obtain your organization ID from the Viam app’s organization settings page.

  • mql_binary (List[bytes]) – The MQL query to run as a list of BSON queries. You can encode your bson queries using a library like pymongo or bson.

Returns:

An array of data objects.

Return type:

List[Dict[str, ValueTypes]]

For more information, see Data Client API.

async binary_data_by_filter(filter: viam.proto.app.data.Filter | None = None, limit: int | None = None, sort_order: viam.proto.app.data.Order.ValueType | None = None, last: str | None = None, include_binary_data: bool = True, count_only: bool = False, include_internal_data: bool = False, dest: str | None = None) Tuple[List[viam.proto.app.data.BinaryData], int, str][source]

Filter and download binary data. The data will be paginated into pages of limit items, and the pagination ID will be included in the returned tuple. If a destination is provided, the data will be saved to that file. If the file is not empty, it will be overwritten.

from viam.utils import create_filter


my_data = []
last = None
my_filter = create_filter(component_name="camera")
while True:
    data, count, last = await data_client.binary_data_by_filter(my_filter, last)
    if not data:
        break
    my_data.extend(data)
Parameters:
  • filter (viam.proto.app.data.Filter) – Optional Filter specifying tabular data to retrieve. No Filter implies all binary data.

  • limit (int) – The maximum number of entries to include in a page. Defaults to 50 if unspecified.

  • sort_order (viam.proto.app.data.Order) – The desired sort order of the data.

  • last (str) – Optional string indicating the ID of the last-returned data. If provided, the server will return the next data entries after the last ID.

  • include_binary_data (bool) – Boolean specifying whether to actually include the binary file data with each retrieved file. Defaults to true (that is, both the files’ data and metadata are returned).

  • count_only (bool) – Whether to return only the total count of entries.

  • include_internal_data (bool) – Whether to return the internal data. Internal data is used for Viam-specific data ingestion, like cloud SLAM. Defaults to False

  • dest (str) – Optional filepath for writing retrieved data.

Returns:

A tuple containing the following: List[viam.proto.app.data.BinaryData]: The binary data, int: The count (number of entries), str: The last-returned page ID.

Return type:

Tuple[List[viam.proto.app.data.BinaryData], int, str]

For more information, see Data Client API.

async binary_data_by_ids(binary_ids: List[viam.proto.app.data.BinaryID], dest: str | None = None) List[viam.proto.app.data.BinaryData][source]

Filter and download binary data.

from viam.proto.app.data import BinaryID

binary_metadata = await data_client.binary_data_by_filter(
    include_file_data=False
)

my_ids = []

for obj in binary_metadata:
    my_ids.append(
        BinaryID(
            file_id=obj.metadata.id,
            organization_id=obj.metadata.capture_metadata.organization_id,
            location_id=obj.metadata.capture_metadata.location_id
        )
    )

binary_data = await data_client.binary_data_by_ids(my_ids)
Parameters:
  • binary_ids (List[viam.proto.app.data.BinaryID]) – BinaryID objects specifying the desired data. Must be non-empty.

  • dest (str) – Optional filepath for writing retrieved data.

Raises:

GRPCError – If no BinaryID objects are provided.

Returns:

The binary data.

Return type:

List[viam.proto.app.data.BinaryData]

For more information, see Data Client API.

async delete_tabular_data(organization_id: str, delete_older_than_days: int) int[source]

Delete tabular data older than a specified number of days.

from viam.utils import create_filter

my_filter = create_filter(component_name="left_motor")
days_of_data_to_delete = 10
tabular_data = await data_client.delete_tabular_data(
    org_id="a12b3c4e-1234-1abc-ab1c-ab1c2d345abc", days_of_data_to_delete)
Parameters:
  • organization_id (str) – ID of organization to delete data from. You can obtain your organization ID from the Viam app’s organization settings page.

  • delete_older_than_days (int) – Delete data that was captured up to this many days ago. For example if delete_older_than_days is 10, this deletes any data that was captured up to 10 days ago. If it is 0, all existing data is deleted.

Returns:

The number of items deleted.

Return type:

int

For more information, see Data Client API.

abstract delete_tabular_data_by_filter(filter: viam.proto.app.data.Filter | None) int[source]
Async:

Deprecated: use delete_tabular_data instead.

async delete_binary_data_by_filter(filter: viam.proto.app.data.Filter | None) int[source]

Filter and delete binary data.

from viam.utils import create_filter

my_filter = create_filter(component_name="left_motor")
res = await data_client.delete_binary_data_by_filter(my_filter)
Parameters:

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.

Returns:

The number of items deleted.

Return type:

int

For more information, see Data Client API.

async delete_binary_data_by_ids(binary_ids: List[viam.proto.app.data.BinaryID]) int[source]

Filter and delete binary data.

from viam.proto.app.data import BinaryID

binary_metadata = await data_client.binary_data_by_filter(
    include_file_data=False
)

my_ids = []

for obj in binary_metadata:
    my_ids.append(
        BinaryID(
            file_id=obj.metadata.id,
            organization_id=obj.metadata.capture_metadata.organization_id,
            location_id=obj.metadata.capture_metadata.location_id
        )
    )

binary_data = await data_client.delete_binary_data_by_ids(my_ids)
Parameters:

binary_ids (List[viam.proto.app.data.BinaryID]) – BinaryID objects specifying the data to be deleted. Must be non-empty.

Raises:

GRPCError – If no BinaryID objects are provided.

Returns:

The number of items deleted.

Return type:

int

For more information, see Data Client API.

async add_tags_to_binary_data_by_ids(tags: List[str], binary_ids: List[viam.proto.app.data.BinaryID]) None[source]

Add tags to binary data.

from viam.proto.app.data import BinaryID

tags = ["tag1", "tag2"]

binary_metadata = await data_client.binary_data_by_filter(
    include_file_data=False
)

my_ids = []

for obj in binary_metadata:
    my_ids.append(
        BinaryID(
            file_id=obj.metadata.id,
            organization_id=obj.metadata.capture_metadata.organization_id,
            location_id=obj.metadata.capture_metadata.location_id
        )
    )

binary_data = await data_client.add_tags_to_binary_data_by_ids(tags, my_ids)
Parameters:
  • tags (List[str]) – List of tags to add to specified binary data. Must be non-empty.

  • binary_ids (List[viam.app.proto.BinaryID]) – List of BinaryID objects specifying binary data to tag. Must be non-empty.

Raises:

GRPCError – If no BinaryID objects or tags are provided.

For more information, see Data Client API.

async add_tags_to_binary_data_by_filter(tags: List[str], filter: viam.proto.app.data.Filter | None = None) None[source]

Add tags to binary data.

from viam.utils import create_filter

my_filter = create_filter(component_name="my_camera")
tags = ["tag1", "tag2"]
res = await data_client.add_tags_to_binary_data_by_filter(tags, my_filter)
Parameters:
  • tags (List[str]) – List of tags to add to specified binary data. Must be non-empty.

  • filter (viam.proto.app.data.Filter) – Filter specifying binary data to tag. If no Filter is provided, all data will be tagged.

Raises:

GRPCError – If no tags are provided.

For more information, see Data Client API.

async remove_tags_from_binary_data_by_ids(tags: List[str], binary_ids: List[viam.proto.app.data.BinaryID]) int[source]

Remove tags from binary data by IDs.

from viam.proto.app.data import BinaryID

tags = ["tag1", "tag2"]

binary_metadata = await data_client.binary_data_by_filter(
    include_file_data=False
)

my_ids = []

for obj in binary_metadata:
    my_ids.append(
        BinaryID(
            file_id=obj.metadata.id,
            organization_id=obj.metadata.capture_metadata.organization_id,
            location_id=obj.metadata.capture_metadata.location_id
        )
    )

binary_data = await data_client.remove_tags_from_binary_data_by_ids(
    tags, my_ids)
Parameters:
  • tags (List[str]) – List of tags to remove from specified binary data. Must be non-empty.

  • binary_ids (List[BinaryID]) – List of BinaryID objects specifying binary data to untag. Must be non-empty.

Raises:

GRPCError – If no binary_ids or tags are provided.

Returns:

The number of tags removed.

Return type:

int

For more information, see Data Client API.

async remove_tags_from_binary_data_by_filter(tags: List[str], filter: viam.proto.app.data.Filter | None = None) int[source]

Remove tags from binary data.

from viam.utils import create_filter

my_filter = create_filter(component_name="my_camera")
tags = ["tag1", "tag2"]
res = await data_client.remove_tags_from_binary_data_by_filter(tags, my_filter)
Parameters:
  • tags (List[str]) – List of tags to remove from specified binary data.

  • filter (viam.proto.app.data.Filter) – Filter specifying binary data to untag. If no Filter is provided, all data will be untagged.

Raises:

GRPCError – If no tags are provided.

Returns:

The number of tags removed.

Return type:

int

For more information, see Data Client API.

async tags_by_filter(filter: viam.proto.app.data.Filter | None = None) List[str][source]

Get a list of tags using a filter.

from viam.utils import create_filter

my_filter = create_filter(component_name="my_camera")
tags = await data_client.tags_by_filter(my_filter)
Parameters:

filter (viam.proto.app.data.Filter) – Filter specifying data to retrieve from. If no Filter is provided, all data tags will return.

Returns:

The list of tags.

Return type:

List[str]

For more information, see Data Client API.

async add_bounding_box_to_image_by_id(binary_id: viam.proto.app.data.BinaryID, label: str, x_min_normalized: float, y_min_normalized: float, x_max_normalized: float, y_max_normalized: float) str[source]

Add a bounding box to an image.

from viam.proto.app.data import BinaryID

MY_BINARY_ID = BinaryID(
    file_id=your-file_id,
    organization_id=your-org-id,
    location_id=your-location-id
)

bbox_label = await data_client.add_bounding_box_to_image_by_id(
    binary_id=MY_BINARY_ID,
    label="label",
    x_min_normalized=0,
    y_min_normalized=.1,
    x_max_normalized=.2,
    y_max_normalized=.3
)

print(bbox_label)
Parameters:
  • binary_id (viam.proto.app.data.BinaryID) – The ID of the image to add the bounding box to.

  • label (str) – A label for the bounding box.

  • x_min_normalized (float) – Min X value of the bounding box normalized from 0 to 1.

  • y_min_normalized (float) – Min Y value of the bounding box normalized from 0 to 1.

  • x_max_normalized (float) – Max X value of the bounding box normalized from 0 to 1.

  • y_max_normalized (float) – Max Y value of the bounding box normalized from 0 to 1.

Raises:

GRPCError – If the X or Y values are outside of the [0, 1] range.

Returns:

The bounding box ID.

Return type:

str

For more information, see Data Client API.

async remove_bounding_box_from_image_by_id(bbox_id: str, binary_id: viam.proto.app.data.BinaryID) None[source]

Removes a bounding box from an image.

from viam.proto.app.data import BinaryID

MY_BINARY_ID = BinaryID(
    file_id=your-file_id,
    organization_id=your-org-id,
    location_id=your-location-id
)

await data_client.remove_bounding_box_from_image_by_id(
binary_id=MY_BINARY_ID,
bbox_id="your-bounding-box-id-to-delete"
)
Parameters:
  • bbox_id (str) – The ID of the bounding box to remove.

  • binary_id (viam.proto.arr.data.BinaryID) – Binary ID of the image to to remove the bounding box from.

For more information, see Data Client API.

async bounding_box_labels_by_filter(filter: viam.proto.app.data.Filter | None = None) List[str][source]

Get a list of bounding box labels using a Filter.

from viam.utils import create_filter

my_filter = create_filter(component_name="my_camera")
bounding_box_labels = await data_client.bounding_box_labels_by_filter(
    my_filter)
Parameters:

filter (viam.proto.app.data.Filter) – Filter specifying data to retrieve from. If no Filter is provided, all labels will return.

Returns:

The list of bounding box labels.

Return type:

List[str]

For more information, see Data Client API.

async get_database_connection(organization_id: str) str[source]

Get a connection to access a MongoDB Atlas Data federation instance.

data_client.get_database_connection(org_id="a12b3c4e-1234-1abc-ab1c-ab1c2d345abc")
Parameters:

organization_id (str) – Organization to retrieve the connection for. You can obtain your organization ID from the Viam app’s organization settings page.

Returns:

The hostname of the federated database.

Return type:

str

For more information, see Data Client API.

async configure_database_user(organization_id: str, password: str) None[source]

Configure a database user for the Viam organization’s MongoDB Atlas Data Federation instance. It can also be used to reset the password of the existing database user.

await data_client.configure_database_user(
    organization_id="<your-org-id>",
    password="your_password"
)
Parameters:
  • organization_id (str) – The ID of the organization. You can obtain your organization ID from the Viam app’s organization settings page.

  • password (str) – The password of the user.

For more information, see Data Client API.

async create_dataset(name: str, organization_id: str) str[source]

Create a new dataset.

name = await data_client.create_dataset(
    name="<dataset-name>",
    organization_id="<your-org-id>"
)
print(name)
Parameters:
  • name (str) – The name of the dataset being created.

  • organization_id (str) – The ID of the organization where the dataset is being created. You can obtain your organization ID from the Viam app’s organization settings page.

Returns:

The dataset ID of the created dataset.

Return type:

str

For more information, see Data Client API.

async list_dataset_by_ids(ids: List[str]) Sequence[viam.proto.app.dataset.Dataset][source]

Get a list of datasets using their IDs.

datasets = await data_client.list_dataset_by_ids(
    ids=["abcd-1234xyz-8765z-123abc"]
)
print(datasets)
Parameters:

ids (List[str]) – The IDs of the datasets being called for. To retrieve these IDs, navigate to your dataset’s page in the Viam app, click in the left-hand menu, and click Copy dataset ID.

Returns:

The list of datasets.

Return type:

Sequence[Dataset]

For more information, see Data Client API.

async list_datasets_by_organization_id(organization_id: str) Sequence[viam.proto.app.dataset.Dataset][source]

Get the datasets in an organization.

datasets = await data_client.list_dataset_by_organization_id(
    organization_id=[""a12b3c4e-1234-1abc-ab1c-ab1c2d345abc""]
)
print(datasets)
Parameters:

organization_id (str) – The ID of the organization. You can obtain your organization ID from the Viam app’s organization settings page.

Returns:

The list of datasets in the organization.

Return type:

Sequence[Dataset]

For more information, see Data Client API.

async rename_dataset(id: str, name: str) None[source]

Rename a dataset specified by the dataset ID.

await data_client.rename_dataset(
    id="abcd-1234xyz-8765z-123abc",
    name="<dataset-name>"
)
Parameters:
  • id (str) – The ID of the dataset.

  • name (str) – The new name of the dataset.

For more information, see Data Client API.

async delete_dataset(id: str) None[source]

Delete a dataset.

await data_client.delete_dataset(
    id="abcd-1234xyz-8765z-123abc"
)
Parameters:

id (str) – The ID of the dataset.

For more information, see Data Client API.

async add_binary_data_to_dataset_by_ids(binary_ids: List[viam.proto.app.data.BinaryID], dataset_id: str) None[source]

Add the BinaryData to the provided dataset.

This BinaryData will be tagged with the VIAM_DATASET_{id} label.

from viam.proto.app.data import BinaryID

binary_metadata = await data_client.binary_data_by_filter(
    include_file_data=False
)

my_binary_ids = []

for obj in binary_metadata:
    my_binary_ids.append(
        BinaryID(
            file_id=obj.metadata.id,
            organization_id=obj.metadata.capture_metadata.organization_id,
            location_id=obj.metadata.capture_metadata.location_id
            )
        )

await data_client.add_binary_data_to_dataset_by_ids(
    binary_ids=my_binary_ids,
    dataset_id="abcd-1234xyz-8765z-123abc"
)
Parameters:
  • binary_ids (List[BinaryID]) – The IDs of binary data to add to dataset. To retrieve these IDs, navigate to your dataset’s page in the Viam app, click in the left-hand menu, and click Copy dataset ID.

  • dataset_id (str) – The ID of the dataset to be added to.

For more information, see Data Client API.

async remove_binary_data_from_dataset_by_ids(binary_ids: List[viam.proto.app.data.BinaryID], dataset_id: str) None[source]

Remove the BinaryData from the provided dataset.

This BinaryData will lose the VIAM_DATASET_{id} tag.

from viam.proto.app.data import BinaryID

binary_metadata = await data_client.binary_data_by_filter(
    include_file_data=False
)

my_binary_ids = []

for obj in binary_metadata:
    my_binary_ids.append(
        BinaryID(
            file_id=obj.metadata.id,
            organization_id=obj.metadata.capture_metadata.organization_id,
            location_id=obj.metadata.capture_metadata.location_id
        )
    )

await data_client.remove_binary_data_from_dataset_by_ids(
    binary_ids=my_binary_ids,
    dataset_id="abcd-1234xyz-8765z-123abc"
)
Parameters:
  • binary_ids (List[BinaryID]) – The IDs of binary data to remove from dataset. To retrieve these IDs, navigate to your dataset’s page in the Viam app, click in the left-hand menu, and click Copy dataset ID.

  • dataset_id (str) – The ID of the dataset to be removed from.

For more information, see Data Client API.

async binary_data_capture_upload(binary_data: bytes, part_id: str, component_type: str, component_name: str, method_name: str, file_extension: str, method_parameters: Mapping[str, Any] | None = None, tags: List[str] | None = None, data_request_times: Tuple[datetime.datetime, datetime.datetime] | None = None) str[source]

Upload binary sensor data.

Upload binary data collected on a robot through a specific component (for example, a motor) along with the relevant metadata to app.viam.com. Binary data can be found under the “Files” subtab of the Data tab on app.viam.com.

time_requested = datetime(2023, 6, 5, 11)
time_received = datetime(2023, 6, 5, 11, 0, 3)

file_id = await data_client.binary_data_capture_upload(
    part_id="INSERT YOUR PART ID",
    component_type='camera',
    component_name='my_camera',
    method_name='GetImages',
    method_parameters=None,
    tags=["tag_1", "tag_2"],
    data_request_times=[time_requested, time_received],
    file_extension=".jpg",
    binary_data=b"Encoded image bytes"
)
Parameters:
  • binary_data (bytes) – The data to be uploaded, represented in bytes.

  • part_id (str) – Part ID of the component used to capture the data.

  • component_type (str) – Type of the component used to capture the data (for example, “movement_sensor”).

  • component_name (str) – Name of the component used to capture the data.

  • method_name (str) – Name of the method used to capture the data.

  • file_extension (str) – The file extension of binary data including the period, for example .jpg, .png, .pcd. The backend will route the binary to its corresponding mime type based on this extension. Files with a .jpeg, .jpg, or .png extension will be saved to the images tab.

  • method_parameters (Optional[Mapping[str, Any]]) – Optional dictionary of method parameters. No longer in active use.

  • tags (Optional[List[str]]) – Optional list of tags to allow for tag-based data filtering when retrieving data.

  • data_request_times (Optional[Tuple[datetime.datetime, datetime.datetime]]) – Optional tuple containing datetime objects denoting the times this data was requested[0] by the robot and received[1] from the appropriate sensor.

Raises:

GRPCError – If an invalid part ID is passed.

Returns:

The file_id of the uploaded data.

Return type:

str

For more information, see Data Client API.

async tabular_data_capture_upload(tabular_data: List[Mapping[str, Any]], part_id: str, component_type: str, component_name: str, method_name: str, method_parameters: Mapping[str, Any] | None = None, tags: List[str] | None = None, data_request_times: List[Tuple[datetime.datetime, datetime.datetime]] | None = None) str[source]

Upload tabular sensor data.

Upload tabular data collected on a robot through a specific component (for example, a motor) along with the relevant metadata to app.viam.com. Tabular data can be found under the “Sensors” subtab of the Data tab on app.viam.com.

time_requested = datetime(2023, 6, 5, 11)
time_received = datetime(2023, 6, 5, 11, 0, 3)

file_id = await data_client.tabular_data_capture_upload(
    part_id="INSERT YOUR PART ID",
    component_type='motor',
    component_name='left_motor',
    method_name='IsPowered',
    tags=["tag_1", "tag_2"],
    data_request_times=[(time_requested, time_received)],
    tabular_data=[{'PowerPCT': 0, 'IsPowered': False}]
)
Parameters:
  • tabular_data (List[Mapping[str, Any]]) – List of the data to be uploaded, represented tabularly as a collection of dictionaries.

  • part_id (str) – Part ID of the component used to capture the data.

  • component_type (str) – Type of the component used to capture the data (for example, “movement_sensor”).

  • component_name (str) – Name of the component used to capture the data.

  • method_name (str) – Name of the method used to capture the data.

  • method_parameters (Optional[Mapping[str, Any]]) – Optional dictionary of method parameters. No longer in active use.

  • tags (Optional[List[str]]) – Optional list of tags to allow for tag-based data filtering when retrieving data.

  • data_request_times (Optional[List[Tuple[datetime.datetime, datetime.datetime]]]) – Optional list of tuples, each containing datetime objects denoting the times this data was requested[0] by the robot and received[1] from the appropriate sensor. Passing a list of tabular data and Timestamps with length n > 1 will result in n datapoints being uploaded, all tied to the same metadata.

Raises:
  • GRPCError – If an invalid part ID is passed.

  • ValueError – If a list of Timestamp objects is provided and its length does not match the length of the list of tabular data.

Returns:

The file_id of the uploaded data.

Return type:

str

For more information, see Data Client API.

async streaming_data_capture_upload(data: bytes, part_id: str, file_ext: str, component_type: str | None = None, component_name: str | None = None, method_name: str | None = None, method_parameters: Mapping[str, Any] | None = None, data_request_times: Tuple[datetime.datetime, datetime.datetime] | None = None, tags: List[str] | None = None) str[source]

Uploads the metadata and contents of streaming binary data.

time_requested = datetime(2023, 6, 5, 11)
time_received = datetime(2023, 6, 5, 11, 0, 3)

file_id = await data_client.streaming_data_capture_upload(
    data="byte-data-to-upload",
    part_id="INSERT YOUR PART ID",
    file_ext="png",
    component_type='motor',
    component_name='left_motor',
    method_name='IsPowered',
    data_request_times=[(time_requested, time_received)],
    tags=["tag_1", "tag_2"]
)
Parameters:
  • data (bytes) – the data to be uploaded.

  • part_id (str) – Part ID of the resource associated with the file.

  • file_ext (str) – file extension type for the data. required for determining MIME type.

  • component_type (Optional[str]) – Optional type of the component associated with the file (for example, “movement_sensor”).

  • component_name (Optional[str]) – Optional name of the component associated with the file.

  • method_name (Optional[str]) – Optional name of the method associated with the file.

  • method_parameters (Optional[str]) – Optional dictionary of the method parameters. No longer in active use.

  • data_request_times (Optional[Tuple[datetime.datetime, datetime.datetime]]) – Optional tuple containing datetime objects denoting the times this data was requested[0] by the robot and received[1] from the appropriate sensor.

  • tags (Optional[List[str]]) – Optional list of tags to allow for tag-based filtering when retrieving data.

Raises:

GRPCError – If an invalid part ID is passed.

Returns:

The file_id of the uploaded data.

Return type:

str

For more information, see Data Client API.

async file_upload(part_id: str, data: bytes, component_type: str | None = None, component_name: str | None = None, method_name: str | None = None, file_name: str | None = None, method_parameters: Mapping[str, Any] | None = None, file_extension: str | None = None, tags: List[str] | None = None) str[source]

Upload arbitrary file data.

Upload file data that may be stored on a robot along with the relevant metadata to app.viam.com. File data can be found under the “Files” subtab of the Data tab on app.viam.com.

file_id = await data_client.file_upload(
    data=b"Encoded image bytes",
    part_id="INSERT YOUR PART ID",
    tags=["tag_1", "tag_2"],
    file_name="your-file",
    file_extension=".txt"
)
Parameters:
  • part_id (str) – Part ID of the resource associated with the file.

  • data (bytes) – Bytes representing file data to upload.

  • component_type (Optional[str]) – Optional type of the component associated with the file (for example, “movement_sensor”).

  • component_name (Optional[str]) – Optional name of the component associated with the file.

  • method_name (Optional[str]) – Optional name of the method associated with the file.

  • file_name (Optional[str]) – Optional name of the file. The empty string “” will be assigned as the file name if one isn’t provided.

  • method_parameters (Optional[str]) – Optional dictionary of the method parameters. No longer in active use.

  • file_extension (Optional[str]) – Optional file extension. The empty string “” will be assigned as the file extension if one isn’t provided. Files with a .jpeg, .jpg, or .png extension will be saved to the images tab.

  • tags (Optional[List[str]]) – Optional list of tags to allow for tag-based filtering when retrieving data.

Raises:

GRPCError – If an invalid part ID is passed.

Returns:

ID of the new file.

Return type:

str

For more information, see Data Client API.

async file_upload_from_path(filepath: str, part_id: str, component_type: str | None = None, component_name: str | None = None, method_name: str | None = None, method_parameters: Mapping[str, Any] | None = None, tags: List[str] | None = None) str[source]

Upload arbitrary file data.

Upload file data that may be stored on a robot along with the relevant metadata to app.viam.com. File data can be found under the “Files” subtab of the Data tab on app.viam.com.

file_id = await data_client.file_upload_from_path(
    part_id="INSERT YOUR PART ID",
    tags=["tag_1", "tag_2"],
    filepath="/Users/<your-username>/<your-directory>/<your-file.txt>"
)
Parameters:
  • filepath (str) – Absolute filepath of file to be uploaded.

  • part_id (str) – Part ID of the component associated with the file.

  • component_type (Optional[str]) – Optional type of the component associated with the file (for example, “movement_sensor”).

  • component_name (Optional[str]) – Optional name of the component associated with the file.

  • method_name (Optional[str]) – Optional name of the method associated with the file.

  • method_parameters (Optional[str]) – Optional dictionary of the method parameters. No longer in active use.

  • tags (Optional[List[str]]) – Optional list of tags to allow for tag-based filtering when retrieving data.

Raises:
  • GRPCError – If an invalid part ID is passed.

  • FileNotFoundError – If the provided filepath is not found.

Returns:

ID of the new file.

Return type:

str

For more information, see Data Client API.

static create_filter(component_name: str | None = None, component_type: str | None = None, method: str | None = None, robot_name: str | None = None, robot_id: str | None = None, part_name: str | None = None, part_id: str | None = None, location_ids: List[str] | None = None, organization_ids: List[str] | None = None, mime_type: List[str] | None = None, start_time: datetime.datetime | None = None, end_time: datetime.datetime | None = None, tags: List[str] | None = None, bbox_labels: List[str] | None = None, dataset_id: str | None = None) viam.proto.app.data.Filter[source]