Skip to content

directed_inputs_class.decorators

Decorator-based input handling for DirectedInputsClass consumers.

This module provides two decorators:

  1. @directed_inputs - class decorator that wires DirectedInputsClass style input loading (environment variables, stdin, explicit mappings) into plain Python classes without requiring inheritance.
  2. @input_config - method decorator that allows fine-grained control over how individual parameters are resolved from the input context (renaming, decoding, required flags, etc.).

The decorated classes automatically receive lazily-evaluated input contexts and runtime metadata that can be consumed by other packages (e.g. python-terraform-bridge) to instantiate the classes safely.

InputConfigConfiguration for resolving a single method parameter from inputs.
DirectedInputsMetadataMetadata exposed on decorated classes for runtime integrations.
InputContextLightweight wrapper around DirectedInputsClass instantiation.
input_configConfigure how a method parameter is populated from inputs.
directed_inputsClass decorator that injects DirectedInputsClass behavior.
_inject_proxiesInject helper properties/methods for interacting with the context.
_wrap_instance_methodsWrap instance methods so missing parameters are auto-populated.
_should_skip_methodDetermine whether an attribute should be wrapped.
_MISSING
_CONFIG_KWARG
_RUNTIME_LOGGING_KWARG
_RUNTIME_SETTINGS_KWARG
_ERR_CONTEXT_NOT_INITIALIZED
_ERR_CONTEXT_MISSING

‘object(…)’

directed_inputs_class.decorators._CONFIG_KWARG

Section titled “directed_inputs_class.decorators._CONFIG_KWARG”

‘_directed_inputs_config’

directed_inputs_class.decorators._RUNTIME_LOGGING_KWARG

Section titled “directed_inputs_class.decorators._RUNTIME_LOGGING_KWARG”

‘_directed_inputs_runtime_logging’

directed_inputs_class.decorators._RUNTIME_SETTINGS_KWARG

Section titled “directed_inputs_class.decorators._RUNTIME_SETTINGS_KWARG”

‘_directed_inputs_runtime_settings’

directed_inputs_class.decorators._ERR_CONTEXT_NOT_INITIALIZED

Section titled “directed_inputs_class.decorators._ERR_CONTEXT_NOT_INITIALIZED”

‘directed_inputs decorator not initialized on this instance’

directed_inputs_class.decorators._ERR_CONTEXT_MISSING

Section titled “directed_inputs_class.decorators._ERR_CONTEXT_MISSING”

‘directed_inputs context missing on instance’

class directed_inputs_class.decorators.InputConfig

Section titled “class directed_inputs_class.decorators.InputConfig”

Configuration for resolving a single method parameter from inputs.

None

None

False

None

False

False

False

True

False

False

False

False

False

Resolve a value from the provided DirectedInputsClass instance.

class directed_inputs_class.decorators.DirectedInputsMetadata

Section titled “class directed_inputs_class.decorators.DirectedInputsMetadata”

Metadata exposed on decorated classes for runtime integrations.

‘field(…)’

Lightweight wrapper around DirectedInputsClass instantiation.

Refresh the context with new DirectedInputsClass options.

Current configuration (copy) used for instantiation.

Resolve a parameter value using the provided configuration.

Return the lazily-instantiated DirectedInputsClass instance.

Configure how a method parameter is populated from inputs.

Class decorator that injects DirectedInputsClass behavior.

Inject helper properties/methods for interacting with the context.

Wrap instance methods so missing parameters are auto-populated.

Determine whether an attribute should be wrapped.