1414 AddBoundingBoxToImageByIDResponse ,
1515 AddTagsToBinaryDataByFilterRequest ,
1616 AddTagsToBinaryDataByIDsRequest ,
17+ BinaryData ,
1718 BinaryDataByFilterRequest ,
1819 BinaryDataByFilterResponse ,
1920 BinaryDataByIDsRequest ,
2021 BinaryDataByIDsResponse ,
2122 BinaryID ,
22- BinaryMetadata ,
2323 BoundingBoxLabelsByFilterRequest ,
2424 BoundingBoxLabelsByFilterResponse ,
2525 CaptureMetadata ,
@@ -140,25 +140,6 @@ def __eq__(self, other: object) -> bool:
140140 return str (self ) == str (other )
141141 return False
142142
143- # TODO (RSDK-6684): Revisit if this shadow type is necessary
144- @dataclass
145- class BinaryData :
146- """Class representing a piece of binary data and associated metadata."""
147-
148- data : bytes
149- """The request data"""
150-
151- metadata : BinaryMetadata
152- """The metadata associated with the data"""
153-
154- def __str__ (self ) -> str :
155- return f"{ self .data } \n { self .metadata } "
156-
157- def __eq__ (self , other : object ) -> bool :
158- if isinstance (other , DataClient .BinaryData ):
159- return str (self ) == str (other )
160- return False
161-
162143 def __init__ (self , channel : Channel , metadata : Mapping [str , str ]):
163144 """Create a `DataClient` that maintains a connection to app.
164145
@@ -335,7 +316,7 @@ async def binary_data_by_filter(
335316 dest (str): Optional filepath for writing retrieved data.
336317
337318 Returns:
338- List[BinaryData]: The binary data.
319+ List[viam.proto.app.data. BinaryData]: The binary data.
339320 int: The count (number of entries)
340321 str: The last-returned page ID.
341322 """
@@ -354,7 +335,7 @@ async def binary_data_by_filter(
354335 include_internal_data = include_internal_data ,
355336 )
356337 response : BinaryDataByFilterResponse = await self ._data_client .BinaryDataByFilter (request , metadata = self ._metadata )
357- data = [ DataClient . BinaryData ( data . binary , data . metadata ) for data in response .data ]
338+ data = list ( response .data )
358339 if dest :
359340 try :
360341 file = open (dest , "w" )
@@ -401,7 +382,7 @@ async def binary_data_by_ids(
401382 GRPCError: If no `BinaryID` objects are provided.
402383
403384 Returns:
404- List[BinaryData]: The binary data.
385+ List[viam.proto.app.data. BinaryData]: The binary data.
405386 """
406387 request = BinaryDataByIDsRequest (binary_ids = binary_ids , include_binary = True )
407388 response : BinaryDataByIDsResponse = await self ._data_client .BinaryDataByIDs (request , metadata = self ._metadata )
@@ -412,7 +393,7 @@ async def binary_data_by_ids(
412393 file .flush ()
413394 except Exception as e :
414395 LOGGER .error (f"Failed to write binary data to file { dest } " , exc_info = e )
415- return [ DataClient . BinaryData ( data . binary , data . metadata ) for data in response .data ]
396+ return list ( response .data )
416397
417398 async def delete_tabular_data (self , organization_id : str , delete_older_than_days : int ) -> int :
418399 """Delete tabular data older than a specified number of days.
0 commit comments