Skip to content

Core Dependencies

mountaineer.dependencies.CoreDependencies

Core dependencies for Mountaineer projects.

get_config_with_type

get_config_with_type(required_type)

For use in dependency injection. Will retrieve your registered ConfigBase from the global registry and ensure that it conforms to the requested type.

async def render(
    self,
    config: AppConfig = Depends(CoreDependencies.get_config_with_type(AppConfig))
):
    ...
PARAMETER DESCRIPTION
required_type

Assert the config class implements this interface. Allows for flexible use of multiple BaseSettings to manage different parts of your application code.

TYPE: Type[T]