github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/python/aistore/sdk/multiobj/object_names.py (about) 1 # 2 # Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. 3 # 4 from typing import List, Iterator, Dict 5 6 from aistore.sdk.multiobj.object_collection import ObjectCollection 7 8 9 class ObjectNames(ObjectCollection): 10 """ 11 A collection of object names, provided as a list of strings 12 13 Args: 14 names (List[str]): A list of object names 15 16 """ 17 18 def __init__(self, names: List[str]): 19 self._names = names 20 21 def get_value(self) -> Dict[str, any]: 22 return {"objnames": self._names} 23 24 def __iter__(self) -> Iterator[str]: 25 return iter(self._names)