fetch_theme#
- fetch_theme()[source]#
Return the path to the bundled PyVisual PyVista theme file.
Resolves
pyvisual_theme.jsonfrom the package’s_assetsdirectory and returns its absolutePath. This file is loaded automatically at import time bypyvisual.coreto apply the default PyVista color theme.- Returns:
- filepath
pathlib.Path Absolute path to
pyvisual_theme.json.
- filepath
- Raises:
FileNotFoundErrorIf
pyvisual_theme.jsonis not found at the expected location. This typically means the file was not included in the installation.
Notes
The path is resolved as:
core_dir = Path(__file__).resolve().parent.parent filepath = core_dir / "_assets" / "pyvisual_theme.json"
Examples
>>> theme_path = fetch_theme() >>> theme_path.name 'pyvisual_theme.json'