8. Metadata
This is a metadata handler class from the sed package
- class sed.core.metadata.MetaHandler(meta=None)
Bases:
object[summary]
- Parameters:
meta (
typing.Optional[typing.Dict], default:None) –
- property metadata: dict
Property returning the metadata dict.
- Returns:
Dictionary of metadata.
- Return type:
dict
- add(entry, name, duplicate_policy='raise')
Add an entry to the metadata container
- Parameters:
entry (
typing.Any) – dictionary containing the metadata to add.name (
str) – name of the dictionary key under which to add entry.duplicate_policy (
str, default:'raise') –Control behaviour in case the ‘name’ key is already present in the metadata dictionary. Can be any of:
”raise”: raises a DuplicateEntryError.
”overwrite”: overwrites the previous data with the new one.
”merge”: If
entryis a dictionary, recursively merges it into the existing one, overwriting existing entries. Otherwise the same as “overwrite”.”append”: adds a trailing number, keeping both entries.
- Raises:
DuplicateEntryError – Raised if an entry already exists.
- Return type:
None
- add_processing(method, **kwds)
docstring
Args:
Returns:
- Parameters:
method (
str) –kwds (
typing.Any) –
- Return type:
None
- from_nexus(val)
docstring
Args:
Returns:
- Parameters:
val (
typing.Any) –- Return type:
None
- to_nexus(val)
docstring
Args:
Returns:
- Parameters:
val (
typing.Any) –- Return type:
None
- from_json(val)
docstring
Args:
Returns:
- Parameters:
val (
typing.Any) –- Return type:
None
- to_json(val)
docstring
Args:
Returns:
- Parameters:
val (
typing.Any) –- Return type:
None
- from_dict(val)
docstring
Args:
Returns:
- Parameters:
val (
typing.Any) –- Return type:
None
- to_dict(val)
docstring
Args:
Returns:
- Parameters:
val (
typing.Any) –- Return type:
None
- exception sed.core.metadata.DuplicateEntryError
Bases:
Exception[summary]