set_config

function of dascore.config source

set_config(
    new_config: dascore.config.DascoreConfig | None[DascoreConfig, None] = None,
    **kwargs ,
)-> ‘DascoreConfig’

Set the process-wide runtime config, visible from every thread and task.

Parameters

Parameter Description
new_config A complete DascoreConfig to install.
Mutually exclusive with keyword overrides.
**kwargs Individual field overrides applied on top of the current base config.
Note

This is a permanent change to the process-wide base (it is not restored automatically). For a temporary, thread/task-local override that restores on exit, use config_context instead.

Examples

import dascore as dc
_ = dc.set_config(display_float_precision=5)
assert dc.get_config().display_float_precision == 5
_ = dc.reset_config()