Skip to content

rs_rich.theme

Generated from the type stubs by scripts/gen_python_api.py; do not edit.

rich.theme: Theme, named styles for a console, and ThemeStack.

Theme

styles property

styles: Dict[str, Style]

config property

config: str

from_file classmethod

from_file(config_file: IO[str], source: Optional[str] = None, inherit: bool = True) -> Theme

read classmethod

read(path: str, inherit: bool = True, encoding: Optional[str] = None) -> Theme

ThemeStack

get

get(name: str, default: Optional[Style] = None) -> Optional[Style]

push_theme

push_theme(theme: Theme, inherit: bool = True) -> None

pop_theme

pop_theme() -> None

ThemeStackError

Bases: Exception

Popping the console's own theme.