pisces.utilities.config#

Pisces global configuration system.

This module provides a hierarchical, YAML-backed configuration manager for Pisces. Configurations can be accessed and updated via dot-separated keys (e.g., pisces_config['system.appearance.disable_progress_bars'] = False) and changes are persisted to disk if autosave is enabled.

Configuration files are located using the following precedence:

  1. Environment variable $PISCES_CONFIG (if set)

  2. Local project file .piscesrc in the current working directory

  3. User-specific config at ~/.config/pisces/config.yaml

  4. Package default config distributed with Pisces

Use pisces_config to access the active configuration. It behaves like a nested dictionary with automatic loading and saving.

Functions

get_config()

Return global Pisces configuration following precedence.

Classes

ConfigManager(path[, autosave])

Hierarchical configuration manager with dot-separated keys and optional autosave.