lsst.dax.apdb g5ea96fc03c+341ea1ce94
|
Public Member Functions | |
__init__ (self, Iterable[str] field_names) | |
str | to_json (self, ApdbConfig config) |
_Config | update (self, _Config config, str json_str) |
Protected Attributes | |
_field_names | |
Class that handles freezing of the configuration parameters, this is an implementation detail for use in Apdb subclasses. Parameters ---------- field_names : `~collections.abc.Iterable` [`str`] Names of configuration fields to be frozen.
str lsst.dax.apdb.apdbConfigFreezer.ApdbConfigFreezer.to_json | ( | self, | |
ApdbConfig | config ) |
Convert part of the configuration object to JSON string. Parameters ---------- config : `ApdbConfig` Configuration object. Returns ------- json_str : `str` JSON representation of the frozen part of the config.
_Config lsst.dax.apdb.apdbConfigFreezer.ApdbConfigFreezer.update | ( | self, | |
_Config | config, | ||
str | json_str ) |
Update configuration field values from a JSON string. Parameters ---------- config : `ApdbConfig` Configuration object. json_str : str String containing JSON representation of configuration. Returns ------- updated : `ApdbConfig` Copy of the ``config`` with some fields updated from JSON object. Raises ------ TypeError Raised if JSON string does not represent JSON object. ValueError Raised if JSON object contains key which is not present in ``field_names``.