Skip to content

textual.constants

This module contains constants, which may be set in environment variables.

COLOR_SYSTEM module-attribute

COLOR_SYSTEM = get_environ('TEXTUAL_COLOR_SYSTEM', 'auto')

Force color system override.

DEBUG module-attribute

DEBUG = _get_environ_bool('TEXTUAL_DEBUG')

Enable debug mode.

DEFAULT_THEME module-attribute

DEFAULT_THEME = get_environ("TEXTUAL_THEME", "textual-dark")

Textual theme to make default. More than one theme may be specified in a comma separated list. Textual will use the first theme that exists.

DEVTOOLS_HOST module-attribute

DEVTOOLS_HOST = get_environ(
    "TEXTUAL_DEVTOOLS_HOST", "127.0.0.1"
)

The host where textual console is running.

DEVTOOLS_PORT module-attribute

DEVTOOLS_PORT = _get_environ_port(
    "TEXTUAL_DEVTOOLS_PORT", 8081
)

Constant with the port that the devtools will connect to.

DIM_FACTOR module-attribute

DIM_FACTOR = (
    _get_environ_int(
        "TEXTUAL_DIM_FACTOR", 66, minimum=0, maximum=100
    )