Showing content from https://rich.readthedocs.io/en/latest/reference/theme.html below:
Website Navigation
rich.theme — Rich 14.0.0 documentation
rich.theme¶
-
class rich.theme.Theme(styles=None, inherit=True)[source]¶
-
A container for style information, used by Console
.
-
Parameters:
-
-
styles (Dict[str, Style], optional) – A mapping of style names on to styles. Defaults to None for a theme with no styles.
-
inherit (bool, optional) – Inherit default styles. Defaults to True.
-
property config: str¶
-
Get contents of a config file for this theme.
-
classmethod from_file(config_file, source=None, inherit=True)[source]¶
-
Load a theme from a text mode file.
-
Parameters:
-
-
config_file (IO[str]) – An open conf file.
-
source (str, optional) – The filename of the open file. Defaults to None.
-
inherit (bool, optional) – Inherit default styles. Defaults to True.
-
Returns:
-
A New theme instance.
-
Return type:
-
Theme
-
classmethod read(path, inherit=True, encoding=None)[source]¶
-
Read a theme from a path.
-
Parameters:
-
-
path (str) – Path to a config file readable by Python configparser module.
-
inherit (bool, optional) – Inherit default styles. Defaults to True.
-
encoding (str, optional) – Encoding of the config file. Defaults to None.
-
Returns:
-
A new theme instance.
-
Return type:
-
Theme
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4