src.common.di_container

Dependency injection container for the Wordle Solver application.

Functions

configure_container_for_testing()

Configure a container specifically for testing with mocks.

get_container()

Get the global container instance.

reset_container()

Reset the global container (useful for testing).

Classes

DIContainer()

Simple dependency injection container.

class src.common.di_container.DIContainer[source]

Simple dependency injection container.

__init__()[source]
register_singleton(interface, factory)[source]

Register a singleton factory.

Return type:

None

register_factory(interface, factory)[source]

Register a factory that creates new instances each time.

Return type:

None

get(interface)[source]

Get an instance of the requested type.

Return type:

TypeVar(T)

reset_singletons()[source]

Reset all singleton instances (useful for testing).

Return type:

None

src.common.di_container.get_container()[source]

Get the global container instance.

Return type:

DIContainer

src.common.di_container.configure_container_for_testing()[source]

Configure a container specifically for testing with mocks.

Return type:

DIContainer

src.common.di_container.reset_container()[source]

Reset the global container (useful for testing).

Return type:

None