click-configfile
This package supports click commands that use configuration files.
What it is and what it does
click-configfile bridges click command-line tools with INI-format configuration files. It lets you define configuration schemas that map INI sections and keys to click command options, then automatically populate those options from a config file at runtime. The package provides ConfigFileReader as a base class and Param/SectionSchema decorators to describe how config sections should be parsed and stored.
The typical workflow is to define a schema class with nested SectionSchema classes (decorated with @matches_section to match section names, including wildcards), subclass ConfigFileReader to specify which config files to read and which schemas to use, then pass the result to click's context_settings as a default_map. This lets your CLI accept both config-file-driven and command-line-driven option values in a unified way.
Use it for:
- Build a CLI tool where users can set defaults in a config file instead of passing all options on every invocation.
- Parse multi-section INI files with dynamic section names (e.g., person.alice, person.bob) into structured command parameters.
- Combine config-file and command-line options, with CLI flags overriding config file values.
- Reduce boilerplate in click commands by centralizing option defaults in an INI file.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extends click with configuration file support, allowing CLI commands to read INI-format config files and merge their values into command options.
Yes, if you need config-file support for a click CLI and are comfortable with a dormant package. The code is simple, has no known vulnerabilities, and low install friction. However, be aware that the last release was 2017 and maintenance is dormant—if you encounter issues with modern Python or click versions, you may need to fork or patch it yourself. Suitable for stable, self-contained projects that don't require ongoing upstream support.
Install
click-configfile on PyPI
pip
pip install click-configfileuv
uv add click-configfilepoetry
poetry add click-configfileInstalling click-configfile
Before you install
Low install friction with a pure-Python wheel. Maintenance is dormant—last release was 2017-09-24 and last commit 2023-09-07—so expect no active bug fixes or feature updates, though the package remains archived-free and has no known vulnerabilities.
License in practice
BSD license (permissive) places no significant restrictions on use, modification, or distribution in most contexts.
Quickstart
pip install click-configfile
from click_configfile import ConfigFileReader, Param, SectionSchema
import click
class MySchema(SectionSchema):
name = Param(type=str)
class MyReader(ConfigFileReader):
config_files = ["config.ini"]
config_section_schemas = [MySchema]
CONTEXT_SETTINGS = dict(default_map=MyReader.read_config())
@click.command(context_settings=CONTEXT_SETTINGS)
def mycmd():
pass
Requires click to be installed; Python 2.6+ or Python 3 support is listed but unspecified in requires_python.
Verify before relying
- Whether the package works reliably with modern Python versions (3.9+) given its last release was 2017.
- Current compatibility with recent versions of click, configparser, and six.
Package facts
| License | BSD (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — click, configparser, six |
| Maintenance | dormant — 3,246 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 556,631/month — #6,018 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: click_configfile-0.2.3-py2.py3-none-any.whl
Keywords: click, configfile, configparser
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
clickClick is a Python toolkit for building…
permissive · top 100 on PyPI
click-config-fileAdds configuration file support to Click…
permissive · top 15,000 on PyPI
click-aliasesAdds command aliases to Click CLI groups and…
permissive · top 5,000 on PyPI
crudinicrudini is a command-line utility for reading,…
copyleft · top 15,000 on PyPI
click-datetimeAdds datetime type support to Click, allowing…
permissive · top 15,000 on PyPI
rich-clickRenders Click command-line interfaces with rich…
permissive · top 1,000 on PyPI
configobjConfigObj reads, writes, and validates…
permissive · top 5,000 on PyPI
ConfigUpdaterConfigUpdater reads and modifies INI…
permissive · top 5,000 on PyPI
typed-configReads typed configuration from multiple sources…
permissive · top 15,000 on PyPI
setoptconfSetoptconf retrieves program settings from…
permissive · top 15,000 on PyPI