Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
9.0.0 - 2026-07-31
Added
- Added a
cli_valuelayer toget_setting, which outranks every other source - Added a
validatorparameter toget_settingandconfig_value - Added an
env_namespaceparameter toget_settingandconfig_value - Added a
dir_namespaceparameter toConfigParserandsettings_class, which relocates the user and system tier search to<tier>/<dir_namespace>/<basename>
Changed
- Moved helper functions to dj_settings.lib
rtypenow defaults to no conversion, instead ofstr- Inverted the tier order: the project value now wins over the user value, which wins over the system value. This is a silent behaviour change: affected applications will not error, they will quietly read different values
- Every path given to
ConfigParserandsettings_classis now a stem: it expands into the project location as given, plus the user ($XDG_CONFIG_HOME) and system (/etc) tiers derived from its basename, each with its.ddirectory ConfigParsernow takes its paths as positional argumentsConfigParser.get_settingis now the only value accessor, and applies the full hierarchy: CLI value, environment, files, default- Derived environment variable names now include
env_namespaceand the sections, uppercased and joined with__ @settings_classnow resolves values at instantiation instead of at decoration, and shares one document across all fields- Files are read once per parser; the environment is read on every resolution
Removed
- Removed the module-level
get_settingfunction (useConfigParser.get_setting) - Removed
ConfigParser.extract_value - Removed
SectionError(replaced bySettingNotFoundError, which reports the section path and the layers consulted) - Removed the
project_dirandfilenameparameters - Dropped python 3.9 support
- Dropped python 3.10 support
Fixed
- Fixed
.envparser crashing on values containing= - Fixed
.envparser not stripping whitespace from keys and values - Fixed
.envparser crashing on lines without= - Fixed YAML loader silently returning non-dict values with no error
- Fixed
deep_mergenot forwardingmerge_arraysto recursive calls - Fixed traversing a section path into a scalar raising
TypeErrorinstead ofSectionError
8.0.0 - 2025-04-26
Changed
- Default has to be set, otherwise it will raise unless the setting is found
7.0.0 - 2025-03-26
Changed
- Changed yaml parser to follow YAML 1.2 spec
6.0.0 - 2024-09-24
Changed
- Changed license to BSD 3-Clause
- Improved error message in section errors
Removed
- Dropped python 3.8 support
5.0.0 - 2024-03-14
Added
- Added a @settings_class decorator to create settings classes
- Allowed all public classes to optionally merge arrays
Changed
- Moved SettingsParser and setting to a new module
- Renamed SettingsParser to ConfigParser
- Renamed setting to get_setting
- SettingsParser now accepts a list of paths to parse
- allow_env is now called use_env and it can take a string to change the name for env vars
Removed
- Dropped python 3.7 support
4.2.1 - 2023-02-28
Fixed
- Fixed some type hints
4.2.0 - 2022-11-23
Added
- Allowed parsing env files
4.1.0 - 2022-11-02
Changed
- Removed the tomli dependency for versions that the standard library TOML parser is present
4.0.0 - 2022-09-26
Added
- Made the settings to be returned in the order that they appear on the file
- Allowed overriding the settings with a .d directory
3.0.1 - 2022-05-03
Fixed
- Fixed a typo that messed using .yml files as settings
3.0.0 - 2022-05-01
Added
- Exposed FileReader and setting via the
__init__module
Fixed
- /etc has the lowest priority and the current working directory has the highest
Changed
- Renamed FileReader to SettingsParser
- Removed the default section from the ini settings parser
2.1.0 - 2022-04-28
Added
- Allowed forcing the filetype
2.0.0 - 2022-03-10
Added
- Allowed passing the path to the FileReader as a string
Changed
- .conf/.ini/.cfg files are now parsed as python dictionaries
1.0.0 - 2022-02-10
Added
- Added yaml support
Changed
- Changed toml parser to tomli
0.4.0 - 2022-02-08
Added
- Added toml support
0.3.0 - 2022-01-10
Removed
- Removed changelog from the published wheel
0.2.0 - 2021-12-24
Added
- Added python310 support
Removed
- Dropped python36 support
- Removed the ability to include python files for settings
0.1.1 - 2021-08-13
Added
- Allowed getting the value from a single setting
0.1.0 - 2020-07-01
Added
- Allowed including python files for settings