hpcflow.sdk.core.object_list.ObjectList#
- class hpcflow.sdk.core.object_list.ObjectList(objects, descriptor=None)#
Bases:
JSONLike
A list-like class that provides item access via a get method according to attributes or dict-keys.
Methods
Get a single object from the object list, by specifying the value of the access attribute, and optionally additional keyword-argument attribute values.
Get one or more objects from the object list, by specifying the value of the access attribute, and optionally additional keyword-argument attribute values.
Get a tuple of the unique access-attribute values of the constituent objects.
- add_object(obj, index=-1, skip_duplicates=False)#
- classmethod from_json_like(json_like, shared_data=None)#
- Parameters:
json_like (Union[Dict, List]) –
shared_data (Optional[Dict[str, ObjectList]]) –
- get(**kwargs)#
Get a single object from the object list, by specifying the value of the access attribute, and optionally additional keyword-argument attribute values.
- get_all(**kwargs)#
Get one or more objects from the object list, by specifying the value of the access attribute, and optionally additional keyword-argument attribute values.
- list_attrs()#
Get a tuple of the unique access-attribute values of the constituent objects.
- to_dict()#
- to_json_like(dct=None, shared_data=None, exclude=None, path=None)#