ConfigArgParse
A drop-in replacement for argparse that allows options to also be set via config files and/or environment variables.
Decision gist · record as of 2026-08-14
Yes. ConfigArgParse is a mature, well-maintained library with no security vulnerabilities, zero runtime dependencies, and broad Python version support. It solves a genuine problem—unifying configuration from multiple sources—that argparse alone does not address. Use it when your application needs to read settings from config files and environment variables alongside command-line arguments.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with no runtime dependencies.
- The package is actively maintained with a recent release and has been stable since its first release in 2014.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations.
last release 2026-03-11 (156 days) · last repo commit 2026-05-05 · 757 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 21,983,774 downloads/mo, #988 on PyPI
Alternatives
Verify before relying
pip install ConfigArgParse
import configargparse
p = configargparse.ArgParser(default_config_files=['~/.config'])
p.add('--name', env_var='NAME')
p.add('--verbose', action='store_true')
options = p.parse_args()- Whether PyYAML is truly optional or required for YAML config file support
- Performance characteristics with large config files or many arguments
- Compatibility with recent Python 3.13+ releases beyond stated support
What it is and what it does
ConfigArgParse is a drop-in replacement for Python's standard argparse module that adds support for reading configuration from files and environment variables alongside command-line arguments. It unifies argument definition and parsing across four sources—command line, environment variables, config files, and defaults—with a clear priority order: command line overrides environment variables, which override config file values, which override defaults.
The package supports multiple config file formats (INI, YAML, and others via subclassing) and automatically documents environment variable and config file options in the help message. It requires no external dependencies by default, though PyYAML is optional for YAML format support. The API is fully compatible with argparse, so existing code can often switch to ConfigArgParse with minimal changes.
Use it for
- Build CLI tools that read settings from ~/.config files, /etc system configs, and environment variables without duplicating argument definitions.
- Deploy applications where configuration comes from multiple sources (Docker env vars, config files, command-line overrides) with predictable precedence.
- Create scientific or data-processing scripts that accept genome paths, database URLs, and other options via config files or environment variables.
- Develop multi-environment applications (dev, staging, prod) where each environment has its own config file but command-line args can override for testing.
- Generate self-documenting help messages that show which settings can be configured via environment variables or config files.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
ConfigArgParse is a mature, well-maintained library with no security vulnerabilities, zero runtime dependencies, and broad Python version support. It solves a genuine problem—unifying configuration from multiple sources—that argparse alone does not address. Use it when your application needs to read settings from config files and environment variables alongside command-line arguments.
Install
configargparse on PyPI
Before you install
Installation is straightforward with no runtime dependencies. The package is actively maintained with a recent release and has been stable since its first release in 2014.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations.
Quickstart
pip install ConfigArgParse
import configargparse
p = configargparse.ArgParser(default_config_files=['~/.config'])
p.add('--name', env_var='NAME')
p.add('--verbose', action='store_true')
options = p.parse_args()
Verify before relying
- Whether PyYAML is truly optional or required for YAML config file support
- Performance characteristics with large config files or many arguments
- Compatibility with recent Python 3.13+ releases beyond stated support
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.6 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 156 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 21,983,774 / month, #988 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: configargparse-1.7.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “config file argument parsing”
- ConfigArgParseExtends Python's argparse to parse command-line arguments, config…
- pyconfiguratorParses command-line arguments and INI configuration files into a…
- oslo.configParses command-line arguments and .ini-style configuration files for…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
ArgBind binds function and class arguments to command-line flags and YAML configuration files, automatically generating CLI interfaces from docstrings and type annotations with support for argument scoping.
However, the package is dormant (last release May 2024, no commits since August 2024) and has high install friction—suitable only for projects where maintenance lag…
Merges configuration from YAML/JSON files, environment variables, and runtime arguments into a single parsed configuration object, applying them in a fixed precedence order.
Manages run configurations for machine learning experiments by combining command-line arguments, INI/JSON/Gin config files, and Weights & Biases logging into a unified interface.
Install only if you can tolerate potential incompatibilities with newer versions of pytorch-lightning, wandb, or gradio, and if you are comfortable maintaining a fork…
Extends Python's standard ConfigParser to preserve comments and formatting when reading and writing INI-style configuration files.
jsonargparse creates command-line interfaces and configuration systems from Python type hints and docstrings, parsing arguments from the command line, config files (JSON, YAML, TOML, Jsonnet), and environment variables.
iniconfig parses INI configuration files while preserving section and entry order, supporting multi-line values, comments, and raising errors with line numbers.
See also jaraco.logging · pyconfigurator · iniparse · setoptconf