pydox.set_params#
- set_params(param_or_grp: str, value: Any | Dict = None, **kwargs) None[source]#
Set the value of a configuration parameter or (sub)group of parameters
Parameter or (sub)groups of parameters are modified in place.
- Parameters:
param_or_grp (str) –
The parameter name or (sub)group of parameters to assign value(s) to. Use a string-dotted notation if necessary, eg:
value (Any, Dict, default=None) – The value to be assigned to
param_or_grp. If set to None, assume to be setting a group of parameters using keyword arguments (see examples below).**kwargs – Use keyword arguments to set parameters for a (sub)group (see examples below).
config (None | Config) – The configuration object to set parameters to. By default, use the global configuration object
pydox.params.
See also
Examples
# Directly: do.set_params('argo.qcflags.psal', [1, 2, 8]) # or at the subgroup level: do.set_params('argo.qcflags', psal=[1, 2, 8]) # or at the group level: do.set_params('argo', qcflags={'psal': [1, 2, 8]})
# with keywords: do.set_params('argo', qcflags={'psal': [1, 2, 8], 'temp': [1, 2, 8]}) # or a nested dictionary: do.set_params('argo', {'qcflags': {'psal': [1, 2, 8], 'temp': [1, 2, 8]}})
# with keywords: do.set_params('argo.qcflags', psal=[1, 2, 8], temp=[1, 2, 8]) # or a dictionary: do.set_params('argo.qcflags', {'psal': [1, 2, 8], 'temp': [1, 2, 8]})