from labelbox.orm import query
from labelbox.orm.db_object import DbObject, Updateable, BulkDeletable
from labelbox.orm.model import Entity, Field, Relationship
from labelbox.pagination import PaginatedCollection
[docs]class DataRow(DbObject, Updateable, BulkDeletable):
""" Internal Labelbox representation of a single piece of data (e.g. image, video, text).
external_id (str): User-generated file name or identifier
row_data (str): Paths to local files are uploaded to Labelbox's server.
Otherwise, it's treated as an external URL.
dataset (Relationship): `ToOne` relationship to Dataset
created_by (Relationship): `ToOne` relationship to User
organization (Relationship): `ToOne` relationship to Organization
labels (Relationship): `ToMany` relationship to Label
metadata (Relationship): `ToMany` relationship to AssetMetadata
predictions (Relationship): `ToMany` relationship to Prediction
external_id = Field.String("external_id")
row_data = Field.String("row_data")
updated_at = Field.DateTime("updated_at")
created_at = Field.DateTime("created_at")
dataset = Relationship.ToOne("Dataset")
created_by = Relationship.ToOne("User", False, "created_by")
organization = Relationship.ToOne("Organization", False)
labels = Relationship.ToMany("Label", True)
metadata = Relationship.ToMany("AssetMetadata", False, "metadata")
predictions = Relationship.ToMany("Prediction", False)
""" Deletes all the given DataRows.
data_rows (list of DataRow): The DataRows to delete.
def __init__(self, *args, **kwargs):
self.metadata.supports_filtering = False
self.metadata.supports_sorting = False