maison
Read settings from config files
What it is and what it does
Maison is a configuration file reader designed for Python packages and command-line tools. It loads settings from files like pyproject.toml or .ini files in a user's directory, with optional validation and built-in caching. The package exposes a UserConfig class that retrieves configuration values by package name, making it straightforward to let users customize tool behavior through standard config files.
The library supports multiple config file types and optional merging of settings across files. It is fully typed and tested. Runtime dependencies are loguru, platformdirs, tomli, typer, and typing-extensions. The package requires Python 3.9 or later.
Use it for:
- Load tool settings from pyproject.toml so users can configure behavior without command-line flags
- Read and validate configuration from .ini or other config files with optional validation
- Cache config file contents to avoid repeated disk reads in long-running applications
- Merge settings from multiple config files to support layered configuration strategies
- Build CLI tools that respect user preferences stored in standard config locations
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Maison reads configuration settings from files like pyproject.toml and .ini files, with support for multiple file types and optional pydantic-based validation.
Yes, if you need to read and validate user configuration files in a Python package or CLI tool. The low install friction, permissive license, and straightforward API make it practical. However, the aging maintenance status (309 days since last release) means you should verify the package still meets your needs and be prepared to maintain a fork if critical issues arise.
Install
maison on PyPI
pip
pip install maisonuv
uv add maisonpoetry
poetry add maisonInstalling maison
Before you install
Low install friction with a pure-Python wheel and five lightweight runtime dependencies. Maintenance status is aging—last release was 309 days ago—so expect slower response to issues.
License in practice
MIT license is permissive, allowing free use, modification, and distribution with minimal restrictions.
Quickstart
pip install maison
from maison import UserConfig
config = UserConfig(package_name="acme")
if config.values["enable_useful_option"]:
# use the config value
Requires Python 3.9 or later.
Verify before relying
- Whether pydantic validation is optional or required for typical use cases
- Performance characteristics when caching large or deeply nested config files
- Exact behavior when multiple config files define conflicting keys
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — loguru, platformdirs, tomli, typer, typing-extensions |
| Maintenance | aging — 309 days since the last release |
| First released | |
| Downloads | 1,183,641/month — #4,253 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: maison-2.0.2-py3-none-any.whl
Keywords: maison
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
pytoolconfigPytoolconfig reads and manages configuration…
copyleft · top 5,000 on PyPI
Flake8-pyprojectFlake8-pyproject enables Flake8 to read its…
permissive · top 5,000 on PyPI
pytest-envA pytest plugin that loads environment…
permissive · top 1,000 on PyPI
fhconfparserReads configuration files in INI, TOML, or JSON…
permissive · top 15,000 on PyPI
INIToolsINITools parses and manipulates INI-style…
permissive · top 15,000 on PyPI
setoptconfSetoptconf retrieves program settings from…
permissive · top 15,000 on PyPI
everettEverett is a configuration library that reads…
copyleft · top 15,000 on PyPI
typed-configReads typed configuration from multiple sources…
permissive · top 15,000 on PyPI
python-decoupleReads configuration parameters from environment…
permissive · top 5,000 on PyPI
bestconfigLoads configuration from multiple file formats…
permissive · top 15,000 on PyPI