@@ -11,8 +11,10 @@ __all__ = [
1111 "FutureVoid" ,
1212 "Future" ,
1313 "Tag" ,
14+ "TagView" ,
1415 "TagNotFoundError" ,
1516 "Tags" ,
17+ "TagsView" ,
1618 "ColumnDefinition" ,
1719 "ColumnDefinitionView" ,
1820 "ColumnView" ,
@@ -28,6 +30,7 @@ __all__ = [
2830 "UnevenUpdateError" ,
2931 "ColumnMissingAppendValueError" ,
3032 "ColumnAlreadyExistsError" ,
33+ "ColumnDoesNotExistError" ,
3134 "InvalidColumnValueError" ,
3235 "GcsStorageProviderFailed" ,
3336 "History" ,
@@ -321,8 +324,52 @@ class Tag:
321324 """
322325 ...
323326
327+ def open_async (self ) -> Future :
328+ """
329+ Asynchronously fetches the dataset corresponding to the tag and returns a Future object.
330+ """
331+ ...
332+
324333 def __repr__ (self ) -> str : ...
325334
335+ class TagView :
336+ """
337+ Describes a read-only tag within the dataset.
338+
339+ Tags are created using [deeplake.Dataset.tag][].
340+ """
341+
342+ @property
343+ def id (self ) -> str :
344+ """
345+ The unique identifier of the tag
346+ """
347+
348+ @property
349+ def name (self ) -> str :
350+ """
351+ The name of the tag
352+ """
353+
354+ @property
355+ def version (self ) -> str :
356+ """
357+ The version that has been tagged
358+ """
359+
360+ def open (self ) -> ReadOnlyDataset :
361+ """
362+ Fetches the dataset corresponding to the tag
363+ """
364+ ...
365+
366+ def open_async (self ) -> Future :
367+ """
368+ Asynchronously fetches the dataset corresponding to the tag and returns a Future object.
369+ """
370+ ...
371+
372+ def __repr__ (self ) -> str : ...
326373
327374class TagNotFoundError (Exception ):
328375 pass
@@ -361,6 +408,34 @@ class Tags:
361408
362409 ...
363410
411+ class TagsView :
412+ """
413+ Provides access to the tags within a dataset.
414+
415+ It is returned by the [deeplake.Dataset.tags][] property on a [deeplake.ReadOnlyDataset][].
416+ """
417+
418+ def __getitem__ (self , name : str ) -> TagView :
419+ """
420+ Return a tag by name
421+ """
422+ ...
423+
424+ def __len__ (self ) -> int :
425+ """
426+ The total number of tags in the dataset
427+ """
428+ ...
429+
430+ def __repr__ (self ) -> str : ...
431+
432+ def names (self ) -> list [str ]:
433+ """
434+ Return a list of tag names
435+ """
436+
437+ ...
438+
364439
365440class ColumnDefinition :
366441 def __repr__ (self ) -> str : ...
@@ -1329,9 +1404,9 @@ class ReadOnlyDataset(DatasetView):
13291404 def __repr__ (self ) -> str : ...
13301405
13311406 @property
1332- def tags (self ) -> Tags :
1407+ def tags (self ) -> TagsView :
13331408 """
1334- The collection of [deeplake.Tags ][] within the dataset
1409+ The collection of [deeplake.TagsView ][] within the dataset
13351410 """
13361411 ...
13371412
@@ -1437,6 +1512,10 @@ class ColumnAlreadyExistsError(Exception):
14371512 pass
14381513
14391514
1515+ class ColumnDoesNotExistError (Exception ):
1516+ pass
1517+
1518+
14401519class InvalidColumnValueError (Exception ):
14411520 pass
14421521
0 commit comments