hydra.overlay.python.dsl.python package
Module contents
A collection of foundational typing constructs specific to Hydra-Python.
Also a namespace package so generated DSL modules under hydra.overlay.python.dsl.python.* (syntax, environment) coexist with these hand-written helpers across multiple sys.path entries (e.g. dist/python/hydra-kernel and dist/python/hydra-python).
- class hydra.overlay.python.dsl.python.Either
Bases:
objectA type alias for sum types (Left[L] | Right[R]). Subscriptable at runtime for cast() compatibility.
- class hydra.overlay.python.dsl.python.FrozenDict(data: Any = None, *, _trusted: bool = False)
Bases:
Mapping[K,V]An immutable variant of the Python dict.
- copy(add_or_replace: dict[K, V] | None = None) FrozenDict[K, V]
- property data: dict[Any, Any]
- class hydra.overlay.python.dsl.python.Node(value: T)
Bases:
Generic[T]A wrapper for another type; a NewType alternative which allows type parameters.
- value: T
- final class hydra.overlay.python.dsl.python.None_
Bases:
object
- class hydra.overlay.python.dsl.python.Optional
Bases:
objectA type alias for optional values (Given[T] | None_). Subscriptable at runtime for cast() compatibility.
- hydra.overlay.python.dsl.python.freeze(obj: Any) Any
Recursively freeze an object into an immutable variant.
- class hydra.overlay.python.dsl.python.frozenlist
Bases:
objectA type alias for immutable lists (tuples). Subscriptable at runtime for cast() compatibility.
- hydra.overlay.python.dsl.python.unsupported(message: str) None
Raise NotImplementedError for unsupported features.
This function is called by generated code when a feature is not yet supported in the Python backend (e.g., inline match expressions).