ResourceDefinitions#
- class pymovements.ResourceDefinitions(resources: Iterable[ResourceDefinition | dict[str, Any]] | None = None)[source]#
List of
ResourceDefinitioninstances.- Parameters:
resources (Iterable[ResourceDefinition | dict[str, Any]] | None) – An iterable of
ResourceDefinitioninstances or dictionaries containingResourceDefinitionparameters. In case an element is a dictionary, it will be converted usingfrom_dict().
Methods
__init__([resources])append(object, /)Append object to the end of the list.
clear()Remove all items from list.
copy()Return a shallow copy of the list.
count(value, /)Return number of occurrences of value.
extend(iterable, /)Extend list by appending elements from the iterable.
filter([content])Filter
ResourceDefinitionsfor content type.from_dict(dictionary)Create a
ResourceDefinitionsinstance from a dictionary of lists of dictionaries.from_dicts(dictionaries)Create a
ResourceDefinitionsinstance from a list of dictionaries.has_content(content)Check if any
ResourceDefinitionhas specific content.index(value[, start, stop])Return first index of value.
insert(index, object, /)Insert object before index.
pop([index])Remove and return item at index (default last).
remove(value, /)Remove first occurrence of value.
reverse()Reverse IN PLACE.
sort(*[, key, reverse])Sort the list in ascending order and return None.
to_dicts(*[, exclude_none])Convert the
ResourceDefinitionsinstance into a list of dictionaries.