Maison is a lightweight Python library designed to simplify reading settings from various configuration files (TOML, YAML, JSON). It automatically searches common system and user locations for configuration, providing a unified access interface. Current version is 2.0.2, with a moderate release cadence, focusing on stability and ease of use.
pip install maisonVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create a simple TOML configuration file and load its settings using `maison.Config`. It shows accessing nested keys with dot notation and providing default values for missing keys.
Use the `Config.get(key, default_value)` method instead, which provides the same functionality.
Update your `Config` initialization from `Config(project_name="my_app")` to `Config(name="my_app")`.
Be explicit about your configuration file's location or name if you want to avoid ambiguity. You can use the `config_file` or `config_dir` arguments in the `Config` initializer to specify exact paths.
Always provide default values when calling `config.get('key', default_value)` for critical settings to ensure your application behaves predictably even if no configuration is found.No dependency data recorded yet.