|
1 | 1 | from labelbox.data.annotation_types.data.tiled_image import TiledImageData |
2 | 2 | from labelbox.utils import camel_case |
3 | | -from typing import List, Optional, Union |
| 3 | +from typing import List, Optional, Union, Dict, Any |
4 | 4 |
|
5 | 5 | from pydantic import BaseModel, Field |
6 | 6 |
|
@@ -126,6 +126,10 @@ class LBV1Label(BaseModel): |
126 | 126 | row_data: str = Field(None, alias="Labeled Data") |
127 | 127 | id: Optional[str] = Field(None, alias='ID') |
128 | 128 | external_id: Optional[str] = Field(None, alias="External ID") |
| 129 | + data_row_media_attributes: Optional[Dict[str, Any]] = Field( |
| 130 | + ..., alias="Media Attributes") |
| 131 | + data_row_metadata: Optional[List[Dict[str, Any]]] = Field( |
| 132 | + ..., alias="DataRow Metadata") |
129 | 133 |
|
130 | 134 | created_by: Optional[str] = Extra('Created By') |
131 | 135 | project_name: Optional[str] = Extra('Project Name') |
@@ -181,7 +185,9 @@ def _data_row_to_common( |
181 | 185 | data_row_info = { |
182 | 186 | 'url' if self._is_url() else 'text': self.row_data, |
183 | 187 | 'external_id': self.external_id, |
184 | | - 'uid': self.data_row_id |
| 188 | + 'uid': self.data_row_id, |
| 189 | + 'media_attributes': self.data_row_media_attributes, |
| 190 | + 'metadata': self.data_row_metadata |
185 | 191 | } |
186 | 192 |
|
187 | 193 | self.media_type = self.media_type or self._infer_media_type() |
|
0 commit comments