All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
- Added
missing_module_policytoload_user_configs()with"error","warn", and"ignore"behaviors for optional modules.
- Renamed
load_user_configs(policy=...)toupdate_policy=...andConfigPolicytoConfigUpdatePolicy.
- Indented
generate_user_configs_yaml()field description comments to make them easier to distinguish from field titles.
- Updated
generate_user_configs_yaml()field comments to include concise type information.
- Improved
generate_user_configs_yaml()comments with clearer configuration block separators, title colons, and multiline docstring/description handling.
- Added the
pydantic-settings-manager generate-user-configsCLI command for writing user settings YAML templates to stdout. - Added
generate_user_configs_yaml()to generate commenteduser_settings.yamltemplates from existing settings managers.
- Refactored the internal package and test layout to follow Crystal Architecture while keeping the top-level public API stable.
- Moved shared manager resolution into
_operations/resolve_settings_manager.pyand removed non-public package re-export modules. - Updated
generate_user_configs_yaml()to emit the structured multi-configuration format forSettingsManager(..., multi=True).
multi=Truemode now automatically falls back toDEFAULT_KEY("default") when no active or default configuration is explicitly set.
- Removed unreachable code in
SettingsManager.settingsthat would raise an error whenDEFAULT_KEYwasn't found in the cache.
- Multi mode now automatically falls back to
DEFAULT_KEY("default") when no active or default configuration is explicitly set.
- Removed direct multi configuration format.
- Replaced multi configuration fields
keyandmapwithdefaultandconfigs. - Removed
get_settings_by_key(). - Multi mode no longer falls back to the first configuration when no active/default configuration is set.
- Multi mode now requires
configsinuser_config.
- Added
defaultfield for selecting the initial active configuration in multi mode. - Added strict validation for multi configuration structure.
- Added
reset_user_config()for clearing user configuration state.
- Updated README and examples to use the v3 structured multi configuration format.
load_user_configs(policy=...)now validates policy values.
- No changes
- Config Merge Policy: Added
policyparameter toload_user_configs()to control how configurations are applied"replace"(default): replaces the existinguser_configentirely (existing behavior, fully backward-compatible)"merge": deep-merges into the existinguser_config; dicts are merged recursively, all other types (None, bool, int, float, str, list) are replaced- Useful when calling
load_user_configs()multiple times on the same manager, e.g. applying a global config first and then environment-specific overrides
- Added
ConfigPolicytype alias (Literal["replace", "merge"]) and exported it from the main package API
- Config Cleanup Helper: Added
clear_user_configs()to clearuser_configfor multiple modules in a single call - Exported
clear_user_configsfrom the main package API - Added helper tests for
clear_user_configs()including custom manager name handling - Added
docs/README.mdto define document targets for internal docs flows
- Refactored helper internals to share module/manager resolution and validation logic between
load_user_configs()andclear_user_configs() - Updated docs cheatsheet frontmatter to use
chat_modelandtools_with_infokeys
- Type aliases for better type safety and code clarity:
ModuleName: Type alias for module name stringsUserConfig: Type alias for single configuration dictionariesUserConfigs: Type alias for multiple configurations (multi-mode)
- Exported new type aliases from main package for public use
- Configuration Aliases: Multi-mode now supports aliases to reference the same configuration with different keys
- Define aliases in
user_configwith"aliases": {"dev": "development", ...} - Supports multi-level aliases (alias of alias)
- Circular reference detection with clear error messages
- Useful for short names, service-specific keys, and migration scenarios
- Works with both direct and structured configuration formats
- Define aliases in
SettingsKeytype alias for better type safety and code clarity when working with configuration keys
- BREAKING: Minimum Python version upgraded from 3.9 to 3.12
- Modernized codebase to use Python 3.12+ syntax (PEP 695):
typekeyword for type aliases- Type parameter syntax for generic classes
- Updated CI to test only Python 3.12 and 3.13
- Updated mypy and ruff target versions to py312
- BREAKING: Dropped support for Python 3.9, 3.10, and 3.11
- Removed
typing_extensionsdependency (no longer needed with Python 3.12+)
get_settings()now treats empty string""asNone, returning current active settings instead of raising an error
- Bootstrap Pattern: New
load_user_configs()helper function for centralized configuration loading across multiple modules - Deep Merge Utility: Exported
update_dict()function for deep merging of nested configuration dictionaries - New Method:
get_settings(key: str | None = None)- More intuitive method for getting settings by key or current active settings - Comprehensive documentation for Bootstrap Pattern with recommended implementation examples
- FAQ section covering common Bootstrap Pattern questions
- Project structure examples for multi-module applications
- Support for custom manager names in
load_user_configs()(defaults tosettings_manager)
- Documentation: Major README restructure with improved organization and Table of Contents
- Enhanced Bootstrap Pattern section with production-ready examples
- Improved configuration file structure documentation with YAML examples
- Better separation between simple single-module and complex multi-module use cases
get_settings_by_key(key: str | None)- Useget_settings(key)instead (will be removed in v3.0.0)
- Removed "Complex Settings with Nested Configuration" section from README (Pydantic-specific, not package-specific)
- Direct Configuration Format: Multi-mode now supports direct configuration format
{"dev": {...}, "prod": {...}}in addition to the existing structured format{"key": "dev", "map": {...}} - Enhanced flexibility for multi-configuration setup with more intuitive API
SettingsManager.user_configsetter in multi-mode now automatically detects configuration format- Improved configuration format detection logic for better reliability
- Updated documentation and examples to showcase both configuration formats
- Simplified condition logic in configuration format detection
- Enhanced test coverage for both direct and structured configuration formats
- API Enhancement:
SettingsManager.get_settings_by_key()now acceptsstr | Noneinstead of juststr - When
Noneis passed toget_settings_by_key(), it returns the current active settings (same behavior as empty string) - Improved API consistency and flexibility for multi-mode configuration access
- Enhanced type annotations for better IDE support and type safety
- Additional test coverage for
Noneparameter handling
- BREAKING: Removed deprecated classes as announced in v1.0.0:
BaseSettingsManager: UseSettingsManagerinsteadSingleSettingsManager: UseSettingsManager(MySettings)insteadMappedSettingsManager: UseSettingsManager(MySettings, multi=True)instead
- Removed internal implementation files:
base.py,single.py,mapped.py,deprecated.py,types.py - Removed
nested_dictutility function (was only used by deprecatedSingleSettingsManager)
- Simplified package structure with only the unified
SettingsManagerclass - Reduced package size by removing deprecated code paths
- Cleaner API surface with only the recommended
SettingsManagerclass
- All functionality is available through the unified
SettingsManagerclass - No breaking changes for users already using
SettingsManager - See migration guide in README for upgrading from deprecated classes
- Added support for Python 3.13
- Enhanced CI/CD pipeline to test against Python 3.13
- Updated project classifiers to include Python 3.13 support
- Improved compatibility testing across all supported Python versions (3.9-3.13)
- Fixed
get_settings_by_keymethod to properly validate single mode usage - Added proper error handling when
get_settings_by_keyis called in single mode - Improved docstring for
get_settings_by_keyto clarify multi-mode requirement and empty key behavior - Enhanced API consistency by restricting multi-mode specific methods to multi-mode only
- Fixed BaseSettingsManager export to use original implementation instead of deprecated wrapper
- BaseSettingsManager no longer shows deprecation warning (only child classes do)
- Maintained backward compatibility for existing BaseSettingsManager usage
- NEW: Unified
SettingsManagerclass that replaces all previous managers - Thread-safe operations with proper locking mechanisms
- Property-based API for more intuitive configuration management
- Support for both single mode (
SettingsManager(MySettings)) and multi mode (SettingsManager(MySettings, multi=True)) - Comprehensive migration guide in README
- New
active_keyproperty for cleaner multi-configuration switching - Enhanced error messages with clear usage instructions
- Thread safety tests and stress testing examples
- BREAKING:
BaseSettingsManager,SingleSettingsManager, andMappedSettingsManagerare now deprecated - BREAKING: CLI args now use dict assignment (
manager.cli_args = {...}) instead of dict access (manager.cli_args[key] = value) - BREAKING: Multi-mode configuration no longer requires
"map"wrapper - Improved internal implementation with consistent map-based approach
- Enhanced type safety with better generic type handling
- Simplified API with property-based operations
BaseSettingsManager: UseSettingsManagerinstead (will be removed in v2.0.0)SingleSettingsManager: UseSettingsManager(MySettings)instead (will be removed in v2.0.0)MappedSettingsManager: UseSettingsManager(MySettings, multi=True)instead (will be removed in v2.0.0)
- Thread safety issues in concurrent environments
- Cache invalidation edge cases
- Memory leaks in long-running applications
- Version bump: 0.2.1 → 0.2.2
- Internal version sync in init.py
- docs: add section on pydantic-config-builder in README
- Version bump: 0.2.0 → 0.2.1
- Internal version sync in init.py
- BREAKING: Migrated from Poetry to uv for dependency management
- Modernized development toolchain with unified linting using ruff
- Updated to use PEP 621 compliant project metadata format
- Introduced PEP 735 dependency groups for flexible development environments
- Enhanced CI/CD pipeline to use uv instead of Poetry
- Improved type checking configuration with stricter MyPy settings
- Updated all development dependencies to latest versions
- Comprehensive development documentation in README
- Support for modular dependency groups (test, lint, dev)
- Enhanced linting rules including pyupgrade and flake8-comprehensions
- Migration guide for developers updating their local environment
- Poetry configuration files (poetry.lock, pyproject.toml Poetry sections)
- Separate black, isort, and flake8 configurations (replaced by ruff)
- Added py.typed file for better type checking support
- Improved package configuration and build process
- Added detailed documentation in README.md
- Added example code for both SingleSettingsManager and MappedSettingsManager
- Improved type hints and documentation
- Initial release
- Implemented SingleSettingsManager for managing single settings object
- Implemented MappedSettingsManager for managing multiple settings objects
- Support for loading settings from multiple sources
- Command line argument overrides
- Settings validation through Pydantic