Description
# pydantic-settings [](https://github.com/pydantic/pydantic-settings/actions/workflows/ci.yml?query=branch%3Amain) [](https://codecov.io/gh/pydantic/pydantic-settings) [](https://pypi.python.org/pypi/pydantic-settings) [](https://github.com/pydantic/pydantic-settings/blob/main/LICENSE) [](https://pepy.tech/project/pydantic-settings) [](https://github.com/pydantic/pydantic-settings) Settings management using Pydantic. See [documentation](https://docs.pydantic.dev/latest/concepts/pydantic_settings/) for more details.
Release History
| Version | Changes | Urgency | Date |
|---|---|---|---|
| 2.14.0 | Imported from PyPI (2.14.0) | Low | 4/21/2026 |
| v2.14.0 | ## What's Changed * Fix parsing env vars into Optional Strict types by @hramezani in https://github.com/pydantic/pydantic-settings/pull/792 * Fix RecursionError with mutually recursive models in CLI by @hramezani in https://github.com/pydantic/pydantic-settings/pull/794 * Fix env_file from model_config ignored in CliApp.run() (#795) by @hramezani in https://github.com/pydantic/pydantic-settings/pull/796 * Update dependencies by @hramezani in https://github.com/pydantic/pydantic-settings/pull | High | 4/20/2026 |
| v2.13.1 | ## What's Changed * Fix regression for bool fields since 2.13.0 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/784 * Fix RecursionError with self-referential models in CliApp by @hramezani in https://github.com/pydantic/pydantic-settings/pull/783 * Fix CLI parsing error for set field types since 2.13.0 (#787) by @hramezani in https://github.com/pydantic/pydantic-settings/pull/788 * Fix AttributeError with nested env vars for dict fields (#785) by @hramezani in https://gi | High | 4/20/2026 |
| v2.13.0 | ## What's Changed * fix: Deterministic alias selection when using validate_by_name by @chbndrhnns in https://github.com/pydantic/pydantic-settings/pull/707 * add deep merge functionality to config file sources by @pmeier in https://github.com/pydantic/pydantic-settings/pull/698 * Add support for AWS Secrets Manager VersionId parameter by @jcyamacho in https://github.com/pydantic/pydantic-settings/pull/708 * bugfix: Return `None` for inaccessible GCP Secret Manager secrets by @zaphod72 in htt | Low | 2/16/2026 |
| v2.12.0 | ## What's Changed * Support for enum kebab case. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/686 * Apply source order: init > env > dotenv > secrets > defaults and pres⦠by @chbndrhnns in https://github.com/pydantic/pydantic-settings/pull/688 * Add NestedSecretsSettings source by @makukha in https://github.com/pydantic/pydantic-settings/pull/690 * Strip non-explicit default values. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/692 * Coerce env vars | Low | 11/10/2025 |
| v2.11.0 | ## What's Changed * CLI Serialize Support by @kschwab in https://github.com/pydantic/pydantic-settings/pull/643 * Inspect type aliases to determine if an annotation is complex by @tselepakis in https://github.com/pydantic/pydantic-settings/pull/644 * Revert "fix: Respect 'cli_parse_args' from model_config with settings_customise_sources (#611)" by @hramezani in https://github.com/pydantic/pydantic-settings/pull/655 * Remove parsing of command line arguments from `CliSettingsSource.__init__`. | Low | 9/24/2025 |
| 2.10.1 | ## What's Changed * Fix UnboundLocalError error in _replace_field_names_case_insensitively by @hramezani in https://github.com/pydantic/pydantic-settings/pull/639 * Remove unknown file reference in documentation by @Viicos in https://github.com/pydantic/pydantic-settings/pull/640 * Prepare release 2.10.1 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/642 **Full Changelog**: https://github.com/pydantic/pydantic-settings/compare/2.10.0...2.10.1 | Low | 6/24/2025 |
| 2.10.0 | ## What's Changed * Fix running tests when azure-keyvault-secrets is not installed by @CyberTailor in https://github.com/pydantic/pydantic-settings/pull/601 * Fix running tests when google-cloud-secret-manager is not installed by @CyberTailor in https://github.com/pydantic/pydantic-settings/pull/602 * Support loading a specific nested key from YAML in YamlConfigSettingsSource by @Seunghan-Jung in https://github.com/pydantic/pydantic-settings/pull/603 * Fix CLI suppression for model group hel | Low | 6/21/2025 |
| v2.9.1 | ## What's Changed * fix: Expose ConfigFileSourceMixing on top level sources/__init__.py by @jbw-vtl in https://github.com/pydantic/pydantic-settings/pull/597 * Fix typo in gcp secret manager error message by @christian-heusel in https://github.com/pydantic/pydantic-settings/pull/598 * Prepare release 2.9.1 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/600 ## New Contributors * @jbw-vtl made their first contribution in https://github.com/pydantic/pydantic-settings/pul | Low | 5/6/2025 |
| v2.9.0 | ## What's Changed * Drop support for Python 3.8 by @Viicos in https://github.com/pydantic/pydantic-settings/pull/560 * Switch to `typing-inspection` by @Viicos in https://github.com/pydantic/pydantic-settings/pull/556 * Introduce `uv` for Project Management by @KanchiShimono in https://github.com/pydantic/pydantic-settings/pull/547 * Refactor sources.py into a subpackage (#546) by @ezwiefel in https://github.com/pydantic/pydantic-settings/pull/548 * chore: cleanup by @CodeWithEmad in https: | Low | 4/18/2025 |
| v2.8.1 | ## What's Changed * Fix for init source kwarg alias resolution. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/550 * Revert usage of positional only argument in `BaseSettings.__init__` by @Viicos in https://github.com/pydantic/pydantic-settings/pull/557 * Revert use of `object` instead of `Any` by @Viicos in https://github.com/pydantic/pydantic-settings/pull/559 * Prepare release 2.8.1 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/558 **Full Chan | Low | 2/27/2025 |
| v2.8.0 | ## What's Changed * CLI support for optional and variadic positional args by @kschwab in https://github.com/pydantic/pydantic-settings/pull/519 * Improve env_prefix config doc by @hramezani in https://github.com/pydantic/pydantic-settings/pull/523 * Add env_nested_max_split setting by @gsakkis in https://github.com/pydantic/pydantic-settings/pull/534 * Avoid using `Any` in `BaseSettings` signature to avoid mypy errors by @Viicos in https://github.com/pydantic/pydantic-settings/pull/529 * As | Low | 2/24/2025 |
| v2.7.1 | ## What's Changed * Move preferred alias resolution to private method by @kschwab in https://github.com/pydantic/pydantic-settings/pull/507 * Prepare release 2.7.1 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/511 **Full Changelog**: https://github.com/pydantic/pydantic-settings/compare/v2.7.0...v2.7.1 | Low | 1/6/2025 |
| v2.7.0 | ## What's Changed * Fix `test_protected_namespace_defaults` with -Wdefault by @CyberTailor in https://github.com/pydantic/pydantic-settings/pull/462 * Make tests more robust to the running environment by @CyberTailor in https://github.com/pydantic/pydantic-settings/pull/464 * Fix rendering of annotations in code example by @Viicos in https://github.com/pydantic/pydantic-settings/pull/470 * Fix alias resolution for default settings source. by @kschwab in https://github.com/pydantic/pydantic-s | Low | 12/13/2024 |
| v2.6.1 | ## What's Changed * Add Python 3.13 support by @hramezani in https://github.com/pydantic/pydantic-settings/pull/450 * Fixes #452 - Adding support for populate_by_name by @hozn in https://github.com/pydantic/pydantic-settings/pull/454 * Refactor path_type_label by @aberenda-optifino in https://github.com/pydantic/pydantic-settings/pull/458 * Revert "Fix context not passed to field validators bug (#417)" by @hramezani in https://github.com/pydantic/pydantic-settings/pull/459 ## New Contribu | Low | 11/1/2024 |
| v2.6.0 | ## What's Changed * Fix nested model field with alias parsing by @hramezani in https://github.com/pydantic/pydantic-settings/pull/400 * Fix PathType typing in case of sequence by @just-maiyak in https://github.com/pydantic/pydantic-settings/pull/402 * Add `cli_ignore_unknown_args` config option. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/405 * Fix AzureKeyVaultSettingsSource problem in case of field with underscore by @hramezani in https://github.com/pydantic/pydantic- | Low | 10/17/2024 |
| v2.5.2 | ## What's Changed * Second fix for the TypeError bug introduced in 2.5 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/396 **Full Changelog**: https://github.com/pydantic/pydantic-settings/compare/v2.5.1...v2.5.2 | Low | 9/11/2024 |
| v2.5.1 | ## What's Changed * Fix TypeError introduced in 2.5 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/392 **Full Changelog**: https://github.com/pydantic/pydantic-settings/compare/v2.5.0...v2.5.1 | Low | 9/11/2024 |
| v2.5.0 | ## What's Changed * Fix a bug in nested vanila dataclass by @hramezani in https://github.com/pydantic/pydantic-settings/pull/357 * CLI Improve Docstring Help Text by @kschwab in https://github.com/pydantic/pydantic-settings/pull/359 * Cli fix default or none object help text by @kschwab in https://github.com/pydantic/pydantic-settings/pull/364 * Determine RootModel complexity from root type by @user1584 in https://github.com/pydantic/pydantic-settings/pull/344 * Add CLI bool flags by @kschw | Low | 9/10/2024 |
| v2.4.0 | ## What's Changed * Fix regex flags accidentally passed as count by @musicinmybrain in https://github.com/pydantic/pydantic-settings/pull/328 * Deprecate `read_env_file` and move it to `DotEnvSettingsSource` by @WarpedPixel in https://github.com/pydantic/pydantic-settings/pull/318 * Fix a bug when loading empty yaml file by @hramezani in https://github.com/pydantic/pydantic-settings/pull/330 * feat: Enable access to the current state in settings sources by @VictorColomb in https://github.com | Low | 7/30/2024 |
| v2.3.4 | ## What's Changed * add in-place reloading in docs by @nrolin in https://github.com/pydantic/pydantic-settings/pull/316 * Nested pydantic dataclasses and doc fixes. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/317 * Remove leftover docstring causing warning on `pydantic` docs build by @sydney-runkle in https://github.com/pydantic/pydantic-settings/pull/321 ## New Contributors * @nrolin made their first contribution in https://github.com/pydantic/pydantic-settings/pull | Low | 6/24/2024 |
| v2.3.3 | ## What's Changed * Fix an intriduced bug in parsing json field with discriminated union by @hramezani in https://github.com/pydantic/pydantic-settings/pull/312 * Add CliSettingsSource alias handling for AliasChoices and AliasPath. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/313 **Full Changelog**: https://github.com/pydantic/pydantic-settings/compare/v2.3.2...v2.3.3 | Low | 6/24/2024 |
| v2.3.2 | ## What's Changed * Initialize CLI source on demand. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/305 * Fix command line help from `argparse` formatting problem by @scottstanie in https://github.com/pydantic/pydantic-settings/pull/307 * Fix issue with nested model uppercase field name in case insensitive mode by @hramezani in https://github.com/pydantic/pydantic-settings/pull/309 ## New Contributors * @scottstanie made their first contribution in https://github.com/py | Low | 6/11/2024 |
| v2.3.1 | ## What's Changed * Fix a regression in parsing env value for nested dict by @hramezani in https://github.com/pydantic/pydantic-settings/pull/301 **Full Changelog**: https://github.com/pydantic/pydantic-settings/compare/v2.3.0...v2.3.1 | Low | 6/5/2024 |
| v2.3.0 | ## What's Changed * Add environment parsing support for enums. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/252 * Improve `explode_env_vars` for better dict handling by @hramezani in https://github.com/pydantic/pydantic-settings/pull/261 * add `PyprojectTomlConfigSettingsSource` by @ITProKyle in https://github.com/pydantic/pydantic-settings/pull/255 * Fix broken link in AliasChoices class by @keenranger in https://github.com/pydantic/pydantic-settings/pull/271 * Update | Low | 6/3/2024 |
| v2.2.1 | ## What's Changed * respect `env_prefix` when `extra` allowed by @zzstoatzz in https://github.com/pydantic/pydantic-settings/pull/238 * Replace tomlkit with tomli and remove toml_file_encoding config by @hramezani in https://github.com/pydantic/pydantic-settings/pull/236 * Revert "Allow nested env var source to override nested init source." by @hramezani in https://github.com/pydantic/pydantic-settings/pull/243 ## New Contributors * @zzstoatzz made their first contribution in https://gith | Low | 2/19/2024 |
| v2.2.0 | ## What's Changed * Fix documentation and update pydantic and pydantic-core dependancies by @Xunop in https://github.com/pydantic/pydantic-settings/pull/194 * Correct a typo in README.md by @felixonmars in https://github.com/pydantic/pydantic-settings/pull/195 * feat: ignore empty env vars by @niventc in https://github.com/pydantic/pydantic-settings/pull/198 * Allow nested env var source to override nested init source. by @kschwab in https://github.com/pydantic/pydantic-settings/pull/204 * | Low | 2/16/2024 |
| v2.1.0 | ## What's Changed * Fix code for mentioned variable in Settings Management by @ikosmala in https://github.com/pydantic/pydantic-settings/pull/146 * Add docs to explain env_prefix does not apply to field alias by @hramezani in https://github.com/pydantic/pydantic-settings/pull/147 * Remove old code relatd to optional dotenv by @hramezani in https://github.com/pydantic/pydantic-settings/pull/155 * Fix broken links by @hramezani in https://github.com/pydantic/pydantic-settings/pull/160 * Add | Low | 11/14/2023 |
| v2.0.3 | ## What's Changed * Fix `_replace_field_names_case_insensitively` precondition inconsistency by @AlexVndnblcke in https://github.com/pydantic/pydantic-settings/pull/130 * Check union args to don't consider Optional fields as complex Union by @hramezani in https://github.com/pydantic/pydantic-settings/pull/138 ## New Contributors * @AlexVndnblcke made their first contribution in https://github.com/pydantic/pydantic-settings/pull/130 **Full Changelog**: https://github.com/pydantic/pydanti | Low | 8/14/2023 |
| v2.0.2 | ## What's Changed * dotenv no error w/ an env key shorter than prefix (#106) by @jvllmr in https://github.com/pydantic/pydantic-settings/pull/107 * Add installation instruction to doc by @hramezani in https://github.com/pydantic/pydantic-settings/pull/111 * Add support for adding config through class kwargs by @hramezani in https://github.com/pydantic/pydantic-settings/pull/112 * Use `pydantic_settings.SettingsConfigDict` instead of `pydantic.ConfigDict` in tests by @hramezani in https://git | Low | 7/14/2023 |
| v2.0.1 | ## What's Changed * pydantic V2 is released by @davidhewitt in https://github.com/pydantic/pydantic-settings/pull/99 * Add explicit type hint to `BaseSettings.model_config` by @Viicos in https://github.com/pydantic/pydantic-settings/pull/97 * Improve `DotenvType` to accept `str` by @hramezani in https://github.com/pydantic/pydantic-settings/pull/96 * Use config values as default in `PydanticBaseEnvSettingsSource.__init__` by @hramezani in https://github.com/pydantic/pydantic-settings/pull/10 | Low | 7/5/2023 |
| v2.0.0 | ## What's Changed * Add `mkdocs.yml` to run mkdocs locally by @Kludex in https://github.com/pydantic/pydantic-settings/pull/67 * Add documentation to pyproject by @Kludex in https://github.com/pydantic/pydantic-settings/pull/69 * Remove unused plugins from `mkdocs.yml` by @Kludex in https://github.com/pydantic/pydantic-settings/pull/70 * Improve docstrings by @hramezani in https://github.com/pydantic/pydantic-settings/pull/72 * β¨ Make `SettingsConfigDict` public by @Kludex in https://github | Low | 6/30/2023 |
| v2.0b1 | ## What's Changed * Format docs for import by @tpdorsey in https://github.com/pydantic/pydantic-settings/pull/48 * Fix fetching env values for nested bytes field by @hramezani in https://github.com/pydantic/pydantic-settings/pull/52 * Uprev pydantic to v2.0a4 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/55 * Update pydantic and pydantic-core dependancies by @hramezani in https://github.com/pydantic/pydantic-settings/pull/58 * Add pytest-examples and make examples in d | Low | 6/2/2023 |
| v2.0a4 | ## What's Changed * Add Pydantic PyPI classifier by @Kludex in https://github.com/pydantic/pydantic-settings/pull/36 * Create py.typed by @Kludex in https://github.com/pydantic/pydantic-settings/pull/45 * Considering extra config in dotenv source by @hramezani in https://github.com/pydantic/pydantic-settings/pull/39 * Modernize type hints by @hramezani in https://github.com/pydantic/pydantic-settings/pull/46 * Prepare for 2.0a4 release by @hramezani in https://github.com/pydantic/pydantic-s | Low | 5/4/2023 |
| v2.0a3 | ## What's Changed * Implement proper support for nested complex env values by @hramezani in https://github.com/pydantic/pydantic-settings/pull/22 * Ignore env_prefix if validation_alias is set by @hramezani in https://github.com/pydantic/pydantic-settings/pull/25 * Change the behavior of field_is_complex to be more similar to pydantic v1 by @dmontagu in https://github.com/pydantic/pydantic-settings/pull/31 * Adopt pydantic-settings docs for Pydantic V2 by @hramezani in https://github.com/pyd | Low | 4/28/2023 |
| v2.0a1 | ## What's Changed * Reimplement setting source classes by @hramezani in https://github.com/pydantic/pydantic-settings/pull/15 * Adopt pydantic-settings with Pydantic V2 by @hramezani in https://github.com/pydantic/pydantic-settings/pull/17 * prepare release to use environments by @samuelcolvin in https://github.com/pydantic/pydantic-settings/pull/20 * add "check" to ci by @samuelcolvin in https://github.com/pydantic/pydantic-settings/pull/21 ## New Contributors * @hramezani made their fi | Low | 4/24/2023 |
