Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Evidentlyai Evidently Legacy UI App

From Leeroopedia
Knowledge Sources
Domains UI, Web Application
Last Updated 2026-02-14 12:00 GMT

Overview

Entry point for creating and running the Evidently legacy UI web application using Litestar and Uvicorn.

Description

The Legacy UI App module provides the primary functions for bootstrapping the Evidently legacy monitoring UI. The create_app function takes an AppConfig instance, creates a component context, applies all registered components to an AppBuilder, builds the final Litestar application, and finalizes it. The run function wraps create_app and starts the Uvicorn ASGI server with the configured host and port.

The get_config function constructs a LocalConfig from optional parameters and environment variables. It supports configuring the host, port, workspace directory, security token (via parameter or the EVIDENTLY_SECRET_ENV environment variable), and an external settings file path. The run_local function combines get_config and run for quick local startup. The litestar_app factory function returns a Litestar app instance suitable for deployment with external ASGI servers. The main function provides a CLI entry point.

Usage

Use this module to start the Evidently monitoring dashboard locally or to create a Litestar application instance for deployment. Call run_local for a quick local start, or use get_config and create_app for more customized setups. Use litestar_app when deploying behind an external ASGI server such as Gunicorn with Uvicorn workers.

Code Reference

Source Location

Signature

def create_app(config: AppConfig) -> Litestar:
    ...

def run(config: AppConfig) -> None:
    ...

def get_config(
    host: str = "127.0.0.1",
    port: int = 8000,
    workspace: str = "workspace",
    secret: str = None,
    conf_path: str = None,
) -> AppConfig:
    ...

def run_local(
    host: str = "127.0.0.1",
    port: int = 8000,
    workspace: str = "workspace",
    secret: Optional[str] = None,
    conf_path: str = None,
) -> None:
    ...

def litestar_app() -> Litestar:
    ...

def main() -> None:
    ...

Import

from evidently.legacy.ui.app import create_app, run, run_local, get_config, litestar_app

I/O Contract

Inputs

Name Type Required Description
config AppConfig Yes (for create_app/run) Application configuration containing service, security, and storage components
host str No Host address to bind the server to (default: "127.0.0.1")
port int No Port number for the server (default: 8000)
workspace str No Path to the local workspace directory (default: "workspace")
secret Optional[str] No Security token for API authentication; also read from EVIDENTLY_SECRET_ENV environment variable
conf_path Optional[str] No Path to an external settings/configuration file

Outputs

Name Type Description
create_app return Litestar A fully configured Litestar ASGI application instance
get_config return AppConfig A populated AppConfig instance ready for use with create_app or run
run return None Starts the Uvicorn server (blocking call)
litestar_app return Litestar A Litestar application instance for external ASGI servers

Usage Examples

from evidently.legacy.ui.app import run_local, get_config, create_app

# Quick local start with defaults
run_local()

# Custom configuration
run_local(host="0.0.0.0", port=9090, workspace="/data/evidently", secret="my-secret")

# Programmatic app creation
config = get_config(host="0.0.0.0", port=8080, workspace="my_workspace")
app = create_app(config)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment