tidy3d.config.ConfigManager#

class ConfigManager[source]#

Bases: object

High-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_default_profile()

Get the currently configured default profile.

get_section(name)

list_profiles()

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

__init__(profile=None, config_dir=None)[source]#
property profile#
property config_dir#
property plugins#
property profiles#
update_section(name, **updates)[source]#
switch_profile(profile)[source]#
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]

save(include_defaults=False)[source]#
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.

list_profiles()[source]#
preview_profile(profile)[source]#
get_section(name)[source]#
as_dict(include_env=True)[source]#

Return the current configuration tree, including defaults for all sections.

__rich__()[source]#

Return a rich renderable representation of the full configuration.

format(*, include_env=True)[source]#

Return a human-friendly representation of the full configuration.

format_section(name)[source]#

Return a string representation for an individual section.

on_section_registered(section)[source]#
on_handler_registered(section)[source]#