skillfed

click-configfile

This package supports click commands that use configuration files.

click-configfile v0.2.3 556.6K downloads/30d#6,018 on PyPI60
Permissive license BSD DORMANT released

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-configfile

uv

uv add click-configfile

poetry

poetry add click-configfile

Installing 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

Development Status :: 3 - AlphaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: End Users/DesktopIntended Audience :: System AdministratorsLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Topic :: Utilities

Tags

click configuration file supportCLI config file parsingINI file to click optionscommand-line config managementclick configparser integration
cli-configclick-extension

More Utilities packages