matflow.ResourceList#

class matflow.ResourceList(_objects)#

Bases: ResourceList

Methods

add_object

from_json_like

get

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

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_scopes

list_attrs

Get a tuple of the unique access-attribute values of the constituent objects.

merge_other

Merge lower-precedence other resource list into this resource list.

normalise

Generate from resource-specs specified in potentially several ways.

to_dict

to_json_like

Overridden to write out as a dict keyed by action scope (like as can be specified in the input YAML) instead of list.

Attributes

element_set

workflow_template

add_object(obj, index=-1, skip_duplicates=False)#
property element_set#
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.

get_scopes()#
list_attrs()#

Get a tuple of the unique access-attribute values of the constituent objects.

merge_other(other)#

Merge lower-precedence other resource list into this resource list.

classmethod normalise(resources)#

Generate from resource-specs specified in potentially several ways.

to_dict()#
to_json_like(dct=None, shared_data=None, exclude=None, path=None)#

Overridden to write out as a dict keyed by action scope (like as can be specified in the input YAML) instead of list.

property workflow_template#