2.1.1.7. rpt_dosi.metadata

2.1.1.7.1. Classes

ClassWithMetaData

Class to manage metadata, providing methods to convert to/from dict and JSON.

2.1.1.7.2. Functions

sync_field_image_db(image, element_db, tag_name[, ...])

sync_field_image_to_db(image, element_db, tag_name)

sync_field_db_to_image(image, element_db, tag_name)

sync_field_image_db_auto(image, element_db, tag_name)

sync_field_image_db_check(image, element_db, tag_name)

2.1.1.7.3. Module Contents

class rpt_dosi.metadata.ClassWithMetaData[source]

Class to manage metadata, providing methods to convert to/from dict and JSON. The class fields that are considered as metadata are store in _metadata_fields.

_metadata_fields: Dict[str, type][source]
_debug_eq = False[source]
_instance_metadata_fields: Dict[str, type][source]
_info_width = 30[source]
to_dict()[source]

Store the metadata attributes to a dictionary.

from_dict(data)[source]

Set the metadata attributes of the instance from a dictionary.

save_to_json(filepath)[source]

Save the metadata attributes to a JSON file.

load_from_json(filepath)[source]

Load metadata attributes from a JSON file.

add_metadata_field(key, mtype)[source]
set_metadata(key, value)[source]
info()[source]
__str__()[source]
debug_eq(s)[source]
__eq__(other)[source]
rpt_dosi.metadata.sync_field_image_db(image, element_db, tag_name, sync_policy='auto')[source]
rpt_dosi.metadata.sync_field_image_to_db(image, element_db, tag_name)[source]
rpt_dosi.metadata.sync_field_db_to_image(image, element_db, tag_name)[source]
rpt_dosi.metadata.sync_field_image_db_auto(image, element_db, tag_name)[source]
rpt_dosi.metadata.sync_field_image_db_check(image, element_db, tag_name, ok=True, msg='')[source]