preheat_open.configuration.NeogridApiConfig

class preheat_open.configuration.NeogridApiConfig

Bases: ConfigBase

Neogrid API configuration settings.

Contains credentials and settings for accessing the Neogrid API.

Attributes:

token (str): API access token url (str): Base URL for API requests 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

runtime_mode

token

update

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

url

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.