tidy3d.config.ConfigManager#
- class ConfigManager[source]#
Bases:
objectHigh-level orchestrator for tidy3d configuration.
Attributes
Methods
__init__([profile, config_dir])apply_web_env(env_vars)Apply environment variable overrides for the web configuration section.
as_dict([include_env])Return the current configuration tree, including defaults for all sections.
format(*[, include_env])Return a human-friendly representation of the full configuration.
format_section(name)Return a string representation for an individual section.
Get the currently configured default profile.
get_section(name)on_handler_registered(section)on_section_registered(section)preview_profile(profile)reset_to_defaults(*[, include_profiles])Reset configuration files to their default annotated state.
save([include_defaults])set_default_profile(profile)Set the default profile to be used on startup.
switch_profile(profile)update_section(name, **updates)Inherited Common Usage
- property profile#
- property config_dir#
- property plugins#
- property profiles#
- set_default_profile(profile)[source]#
Set the default profile to be used on startup.
- Parameters:
profile (Optional[str]) – The profile name to use as default, or None to clear the default. When set, this profile will be automatically loaded unless overridden by environment variables (TIDY3D_CONFIG_PROFILE, TIDY3D_PROFILE, or TIDY3D_ENV).
Notes
This setting is persisted to config.toml and survives across sessions. Environment variables always take precedence over the default profile.
- get_default_profile()[source]#
Get the currently configured default profile.
- Returns:
The default profile name if set, None otherwise.
- Return type:
Optional[str]
- reset_to_defaults(*, include_profiles=True)[source]#
Reset configuration files to their default annotated state.
- apply_web_env(env_vars)[source]#
Apply environment variable overrides for the web configuration section.
- as_dict(include_env=True)[source]#
Return the current configuration tree, including defaults for all sections.