# System map — pydantic/pydantic-settings

> Canonical page: https://codevetter.com/unpack/pydantic-settings/system-map

# System map — pydantic/pydantic-settings

Scanned commit 5927b441848c330853eac74c82358bc283cd3640 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

The runtime is an importable Python package whose primary boundary is model construction. BaseSettings orchestrates source selection and merging, while source modules own input acquisition and preparation. CLI execution adds parser and command-dispatch boundaries around the same settings machinery. Packaging, development checks, documentation rendering, and tagged releases are configured separately.
- The package initializer exposes BaseSettings, SettingsConfigDict, CliApp, source providers, CLI annotations, decoding markers, and version metadata as the public import surface. — [pydantic_settings/__init__.py#L1-L34](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/__init__.py#L1-L34) [pydantic_settings/__init__.py#L36-L74](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/__init__.py#L36-L74)
- BaseSettings subclasses Pydantic BaseModel; its constructor prepares sources, merges their mappings, and passes the result to BaseModel.__init__ for validation. — [pydantic_settings/main.py#L152-L159](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/main.py#L152-L159) [pydantic_settings/main.py#L249-L286](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/main.py#L249-L286)
- PydanticBaseSettingsSource defines the dictionary-producing source contract, field acquisition/preparation hooks, and access to prior aggregate and per-source state. — [pydantic_settings/sources/base.py#L106-L158](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/sources/base.py#L106-L158) [pydantic_settings/sources/base.py#L173-L212](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/sources/base.py#L173-L212)
- Environment, dotenv, and flat secret sources are built into construction; JSON, TOML, YAML, pyproject, nested secrets, and cloud integrations are additional source classes selected through customization. — [pydantic_settings/main.py#L461-L516](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/main.py#L461-L516) [pydantic_settings/main.py#L664-L691](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/main.py#L664-L691) [pydantic_settings/__init__.py#L3-L32](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/__init__.py#L3-L32)
- Runtime retention includes a process-local settings cache keyed by exact model class and separate per-class construction locks; source mappings and merge state otherwise belong to settings resolution. — [pydantic_settings/main.py#L51-L53](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/main.py#L51-L53) [pydantic_settings/main.py#L288-L327](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/main.py#L288-L327) [pydantic_settings/main.py#L556-L572](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pydantic_settings/main.py#L556-L572)
- Hatchling builds the distribution and reads its dynamic version from version.py; the manifest requires Python >=3.10, Pydantic >=2.7.0, python-dotenv, typing-extensions, and typing-inspection. — [pyproject.toml#L1-L6](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pyproject.toml#L1-L6) [pyproject.toml#L41-L48](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pyproject.toml#L41-L48)
- Optional extras supply YAML, TOML, Azure, AWS, and GCP dependencies; Makefile development commands use uv for installation, Ruff lint/format checks, mypy, and pytest under coverage. — [pyproject.toml#L50-L58](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pyproject.toml#L50-L58) [Makefile#L4-L29](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/Makefile#L4-L29)
- Documentation uses strict MkDocs Material configuration; the inspected CI publishes a built package to PyPI only for tags after its aggregate check succeeds, using a release environment and OIDC permission. — [mkdocs.yml#L1-L8](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/mkdocs.yml#L1-L8) [mkdocs.yml#L40-L55](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/mkdocs.yml#L40-L55) [.github/workflows/ci.yml#L163-L194](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/.github/workflows/ci.yml#L163-L194)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
