preheat_open.configuration.PersonalConfig

class preheat_open.configuration.PersonalConfig

Bases: ConfigBase

Personal configuration settings.

Holds personal identification and preferences information.

Attributes:

name (str): The user’s name email (str): The user’s email address timezone (str): The user’s timezone runtime_mode (int): The current runtime mode

__init__()

Initialize configuration from environment variables.

Methods

__init__()

Initialize configuration from environment variables.

iter_items()

Iterate over all attributes of the configuration object.

pretty_print([anonymize])

Create a string representation with sensitive fields masked.

temporary()

Return a context manager that temporarily sets environment variables.

Attributes

email

name

runtime_mode

timezone

update

Get a proxy object to update configuration attributes and environment variables.

class TempContext(config_obj)

Bases: Generic[T]

Context manager for temporarily setting environment variables.

iter_items()

Iterate over all attributes of the configuration object.

Return type:

Generator[tuple[str, Any], None, None]

Yields:

tuple[str, Any]: A tuple of attribute name and value

pretty_print(anonymize=None)

Create a string representation with sensitive fields masked.

Return type:

str

Returns:

str: String representation of the configuration

temporary()

Return a context manager that temporarily sets environment variables.

Return type:

TempContext[T]

Usage:
with config.temporary():

# Environment variables reflect config values here

# Original environment variables restored here

Returns:

TempContext: A context manager that preserves the specific config type

property update: UpdateProxy

Get a proxy object to update configuration attributes and environment variables.