tik_manager4.objects.metadata ============================= .. py:module:: tik_manager4.objects.metadata .. autoapi-nested-parse:: Module to hold and manage metadata. Classes ------- .. autoapisummary:: tik_manager4.objects.metadata.FilteredData tik_manager4.objects.metadata.Metadata tik_manager4.objects.metadata.Metaitem Module Contents --------------- .. py:class:: FilteredData(**kwargs) Bases: :py:obj:`dict` Class to filter the overridden and new data. .. py:method:: update_new_data(settings_data) .. py:method:: update_overridden_data(settings_data) .. py:class:: Metadata(data_dictionary) Bases: :py:obj:`dict` Metadata class. .. py:method:: add_item(key, value, overridden=False) Add an item to the metadata. Args: key (str): The key to add. value (any): The value to add. overridden (bool): Whether the value is overridden or inheriting from the parent. Returns: Metaitem: The Metaitem object that was created. .. py:method:: copy() Return a copy of the metadata. .. py:method:: exists(key) Check if the key exists. .. py:method:: get_all_items() Return all items in the metadata. .. py:method:: get_value(key, fallback_value=None) Get the value of a key. Args: key (str): The key to get the value of. fallback_value (any): The value to return if the key is not found. .. py:method:: is_overridden(key) Check if a key is overridden. Args: key (str): The key to check. Returns: bool: True if the key is overridden, False otherwise. .. py:method:: override(data_dictionary) Override the metadata with a new dictionary. Args: data_dictionary (dict): The dictionary to override the metadata with. .. py:class:: Metaitem Hold the value and overridden status of a property. .. py:attribute:: overridden :type: bool .. py:attribute:: value :type: Union[str, int, float, bool, list, dict, None]