NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #833 most downloaded on PyPI
A drop-in replacement for argparse that allows options to also be set via config files and/or environment variables.
Latest stable
1.9.0
Last release 25 days ago
27 Oct 2026
Ships unpredictably
gaps range from 9 days to 1.8 years
Some releases are documented
notes for 12 of 34 stable releases
2 versions withdrawn
withdrawn after publishing
12 years old
36 releases · first in 2014
Drag across the ruler to compare, or tap a release to open it.
A false value for a flag now overrides lower-priority sources ( #365 , #105 )
A false value for a flag now overrides lower-priority sources (#365, #105)
Previously, setting a flag (an arg that takes no value, such as store_true, store_false, count or store_const) to false in an environment variable or a higher-priority config file added nothing to the command line, so a true for the same flag in a lower-priority config file still turned it on. Now the false value counts as setting the flag, and lower-priority config files no longer set it. For example, VERBOSE=false now wins over verbose = true in a config file. Args that take a value are unchanged.
A bare -- in a list value is now an error
A list value from a config file or environment variable, such as items = [a, --], used to put a bare -- on the command line, which ended option parsing and turned the user's own command-line options after it into positional args. It now fails with an error that names the key.
-- on the command line no longer block other sources (#363). In prog -- --level, --level is a positional arg, so environment variables and config files can still set --level.IniConfigParser.serialize() escapes % (#364), so values like %Y-%m-%d read back unchanged, and a saved %(name)s is no longer replaced by another key's value when the file is loaded.store_false and store_const values (#360). write_config_file() now writes true or false according to whether the flag was given, rather than the value the flag stores.ConfigparserConfigFileParser reads files that only have a [DEFAULT] section (#362), including the files its own serialize() writes.ConfigparserConfigFileParser round trip: values written by serialize() read back the same in more cases (for example strings that look like lists, and list elements containing # or ;), a value that will be cut short by a # or ; comment now produces a warning, and interpolation errors name only the key, not the value, which may be a secret.Full changelog: v1.8.0...v1.9.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Values for mutually exclusive options now follow the usual override order ( #164 , #358 )
Values for mutually exclusive options now follow the usual override order (#164, #358)
Previously, if a config file or env var set one member of a mutually exclusive group and a different member was given on the command line, both were added and argparse failed with not allowed with argument. Now a value is dropped whenever another option in its mutually exclusive group is already set by a higher-priority source (command line, then env vars, then config files), matching how overrides already work for a single option. Options set together within one source still raise the conflict error.
Python 3.14 is now supported and tested in CI (#359)
Full changelog: v1.7.7...v1.8.0
Args with a custom argparse.Action and nargs can now be set from a config file ( #354 , #357 )
Args with a custom argparse.Action and nargs can now be set from a config file (#354, #357)
An arg declared with a custom Action subclass and nargs="+" parsed fine from the command line but was rejected from a config file with can't be set to a list ... unless its action type is changed to 'append' or nargs is set to '*', '+', or > 1, which is not what the check actually tested. The check now looks only at nargs, as the message always said. Thanks to @yobeonline for the report and @lo-0l for the fix.
toml is now a declared optional dependency (#355, #356)
TomlConfigParser reads with the standard library's tomllib on Python 3.11+ and falls back to the toml package below that, but that dependency was not declared anywhere. There is now a toml extra:
pip install configargparse[toml]
Note that tomllib can only read, so writing a config file out needs the toml package on every Python version.
A missing optional dependency is no longer silent. CompositeConfigParser tries each parser in turn, and a parser whose optional dependency was not installed used to be skipped indistinguishably from one that simply could not read the file. Such a parser now raises ConfigFileParserMissingDependency (a subclass of ConfigFileParserException, so existing handlers keep working), and the composite emits a warning naming the parser and how to install it, then continues down the chain.
TOML config files can now be read from binary streams on Python versions before 3.11.
Thanks to @TobiasDijkhuis for reporting and implementing this.
Full changelog: v1.7.6...v1.7.7
config file and environment variable values can no longer trigger writing out a config file
config file and environment variable values can no longer trigger writing out a config file
config file values containing newlines are now rejected when writing out a config file, rather than written out as separate keys
Slightly simplified PyPI deployment workflow via setuptools-scm
Slightly simplified PyPI deployment workflow via setuptools-scm
Fix TOML parser to read all matching sections instead of only the first
Nothing published for this version
The primary purpose of this release is to fix the package metadata on supported python versions.
The primary purpose of this release is to fix the package metadata on supported python versions.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fixes https://github.com/bw2/ConfigArgParse/issues/179
Fixes https://github.com/bw2/ConfigArgParse/issues/179
allow use of nargs with action=append
Merged ConfigparserConfigFileParser - PR #173 - which adds support for python's Configparser config file format
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
moved existing config file parsing logic into DefaultConfigFileParser, and added YAMLConfigFileParser. The config file format can now be selected by s
DefaultConfigFileParser, and added YAMLConfigFileParser. The config file format can now be selected by setting the config_file_parser_class constructor arg to one of these Parser classes.config file syntax is now easier to override or extend using the new constructor arg: config_file_parser (via merged PR #28 - thanks @lahwaacz )
Fixes and features:
config_file_parser (via merged PR #28 - thanks @lahwaacz )Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.