Skip to content

Application API

The Application API provides classes and functions for creating and managing Ascender Framework applications.

It's a main entry point for initializing and configuring your application, Ascender Framework deeply depends on it.

createApplication

createApplication(app_module: type[AscModuleRef] | None = None, config: IBootstrap | None = None) -> Application

Creates an Application instance based on the provided app module or configuration.

Parameters:

Name Type Description Default
app_module type[AscModuleRef] | None

An optional application module implementing AscModuleRef.

None
config IBootstrap | None

An optional list of providers for root-level configuration.

None

Returns:

Type Description
Application

An initialized Application instance.

Raises:

Type Description
ValueError

If both app_module and config are None or specified at the same time.

Application

is_ok

is_ok() -> bool

Checks if the application has been properly initialized with a root injector.

Returns

bool True if the application is properly initialized, False otherwise.

launch

launch()

Launches application in server-mode and builds up fastapi enforcing Uvicorn to handle server part

See Also