Skip to content

core

uzi.graph.core

Graph

Bases: ReadonlyDict[_T_BindKey, _T_Node]

An isolated dependency resolution graph for a given container.

Assembles the dependency graphs of dependencies registered in their container.

Attributes:

Name Type Description
container Container

The container who's graph we are creating

parent Graph

The parent graph. Defaults to None

Parameters:

Name Type Description Default
container Container

The container who's graph we are creating

required
parent Graph

The parent graph. Defaults to NullGraph

None

parents()

Returns a generetor that iterates over the graph's ancestor starting from the current parent to the root graph.

Yields:

Name Type Description
ancestor Graph

an ancestor.

NullGraph

Bases: Graph

A 'noop' Graph used as the parent of root scopes.

Attributes:

Name Type Description
container frozendict
parent None

The parent graph

Back to top