metadataObject¶
- class Stoner.core.base.metadataObject(*args)[source]¶
Bases:
MutableMapping
Represent some sort of object that has metadata stored in a
Stoner.Core.typeHintedDict
object.- metadata¶
Dictionary of key-value metadata pairs. The dictionary tries to retain information about the type of data so as to aid import and export from CM group LabVIEW code.
- Type:
Attributes Summary
Read the metadata dictionary.
Methods Summary
clear
()get
(k[,d])items
()Make sure we implement an items that doesn't just iterate over self.
keys
()Return the keys of the metadata dictionary.
load
(filename, *args, **kargs)Stub method for a load function.
pop
(k[,d])If key is not found, d is returned if given, otherwise KeyError is raised.
popitem
()as a 2-tuple; but raise KeyError if D is empty.
save
([filename])Stub method for a save function.
setdefault
(k[,d])update
([E, ]**F)If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
values
()Return the values of the metadata dictionary.
Attributes Documentation
- metadata¶
Read the metadata dictionary.
Methods Documentation
- clear() None. Remove all items from D. ¶
- get(k[, d]) D[k] if k in D, else d. d defaults to None. ¶
- items() Tuple[str, Any] [source]¶
Make sure we implement an items that doesn’t just iterate over self.
- classmethod load(filename: Union[str, bytes, PurePath, bool], *args: Any, **kargs: Any) metadataObject [source]¶
Stub method for a load function.
- pop(k[, d]) v, remove specified key and return the corresponding value. ¶
If key is not found, d is returned if given, otherwise KeyError is raised.
- popitem() (k, v), remove and return some (key, value) pair ¶
as a 2-tuple; but raise KeyError if D is empty.
- save(filename: Union[str, bytes, PurePath, bool] = None, **kargs: Any)[source]¶
Stub method for a save function.
- setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D ¶
- update([E, ]**F) None. Update D from mapping/iterable E and F. ¶
If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v