Skip to content


Constants that we might want to expose via the public API.

COLOR_SYSTEM module-attribute

COLOR_SYSTEM: Final[str | None] = get_environ(

Force color system override

DEBUG module-attribute

DEBUG: Final[bool] = _get_environ_bool('TEXTUAL_DEBUG')

Enable debug mode.

DEVTOOLS_HOST module-attribute

DEVTOOLS_HOST: Final[str] = get_environ(

The host where textual console is running.

DEVTOOLS_PORT module-attribute

DEVTOOLS_PORT: Final[int] = _get_environ_int(

Constant with the port that the devtools will connect to.

DRIVER module-attribute

DRIVER: Final[str | None] = get_environ(

Import for replacement driver.

FILTERS module-attribute

FILTERS: Final[str] = get_environ('TEXTUAL_FILTERS', '')

A list of filters to apply to renderables.

LOG_FILE module-attribute

LOG_FILE: Final[str | None] = get_environ(
    "TEXTUAL_LOG", None

A last resort log file that appends all logs, when devtools isn't working.

MAX_FPS module-attribute

MAX_FPS: Final[int] = _get_environ_int('TEXTUAL_FPS', 60)

Maximum frames per second for updates.

PRESS module-attribute

PRESS: Final[str] = get_environ('TEXTUAL_PRESS', '')

Keys to automatically press.

SCREENSHOT_DELAY module-attribute

SCREENSHOT_DELAY: Final[int] = _get_environ_int(

Seconds delay before taking screenshot.

SCREENSHOT_FILENAME module-attribute

SCREENSHOT_FILENAME: Final[str | None] = get_environ(

The filename to use for the screenshot.

SCREENSHOT_LOCATION module-attribute

SCREENSHOT_LOCATION: Final[str | None] = get_environ(

The location where screenshots should be written.

SHOW_RETURN module-attribute

SHOW_RETURN: Final[bool] = _get_environ_bool(

Write the return value on exit.

TEXTUAL_ANIMATIONS module-attribute

TEXTUAL_ANIMATIONS: AnimationLevel = (

Determines whether animations run or not.