skillfed

maison

Read settings from config files

maison v2.0.2 1.2M downloads/30d#4,253 on PyPI
Permissive license MIT AGING released

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 maison

uv

uv add maison

poetry

poetry add maison

Installing 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

Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.9

Tags

read config filespyproject.toml configurationconfig file parsingapplication settings loaderconfiguration validationini file readerconfig merging
config-managementcli-tools

More Software Development packages