# System map — pydantic/pydantic

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

# System map — pydantic/pydantic

Scanned commit 29933d1c8cfc882a7640f4d831b09381b39aa311 (2026-10-01). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

This checkout is a library workspace with Python and native-extension boundaries. The Python package constructs schemas and exposes developer APIs; pydantic-core compiles schema descriptions into Rust validator and serializer objects. Model state belongs to Python instances, while compiled schemas belong to classes or adapters. Packaging, documentation publication, and ecosystem checks are handled by repository tooling and GitHub Actions.
- The package entrypoint checks core compatibility immediately, then lazily resolves public attributes through _dynamic_imports and caches exports from the imported module. — [pydantic/__init__.py#L5-L9](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/__init__.py#L5-L9) [pydantic/__init__.py#L430-L457](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/__init__.py#L430-L457)
- ModelMetaclass collects configuration and decorators, builds fields, and either installs deferred mocks or calls complete_model_class. — [pydantic/_internal/_model_construction.py#L116-L133](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L116-L133) [pydantic/_internal/_model_construction.py#L146-L151](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L146-L151) [pydantic/_internal/_model_construction.py#L215-L259](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/_internal/_model_construction.py#L215-L259)
- Core schemas are dictionaries with supported type tags; GenerateSchema produces them, and Rust build_validator_inner dispatches their type to concrete validator builders. — [docs/internals/architecture.md#L27-L45](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/docs/internals/architecture.md#L27-L45) [pydantic-core/src/validators/mod.rs#L538-L564](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/validators/mod.rs#L538-L564)
- The _pydantic_core PyO3 module exports SchemaValidator, SchemaSerializer, JSON helpers, URL types, and structured errors; module initialization also exposes build information and the recursion limit. — [pydantic-core/src/lib.rs#L110-L136](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/src/lib.rs#L110-L136)
- The root package requires Python >=3.10, uses Hatchling, and pins pydantic-core==2.49.0; uv resolves that dependency from the local workspace member. — [pyproject.toml#L1-L3](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L1-L3) [pyproject.toml#L45-L53](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L45-L53) [pyproject.toml#L204-L215](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pyproject.toml#L204-L215)
- The core uses Maturin with module name pydantic_core._pydantic_core; Cargo builds cdylib/rlib artifacts with Rust edition 2024 and minimum Rust 1.88. — [pydantic-core/pyproject.toml#L1-L3](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/pyproject.toml#L1-L3) [pydantic-core/pyproject.toml#L88-L94](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/pyproject.toml#L88-L94) [pydantic-core/Cargo.toml#L1-L4](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/Cargo.toml#L1-L4) [pydantic-core/Cargo.toml#L25-L55](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic-core/Cargo.toml#L25-L55)
- The inspected storage boundary is caller-owned: model state consists of __dict__, extras, explicit-field tracking, and private attributes; dumps return values rather than writing application records. — [pydantic/main.py#L520-L536](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L520-L536) [pydantic/main.py#L587-L604](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L587-L604) [pydantic/main.py#L1208-L1223](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/pydantic/main.py#L1208-L1223)
- Makefile defines lint, typecheck, test, benchmark, and documentation commands; tag-gated CI publishes core before Pydantic, while documentation jobs publish dev/latest versions and upload Algolia search data. — [Makefile#L33-L79](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/Makefile#L33-L79) [Makefile#L131-L137](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/Makefile#L131-L137) [.github/workflows/ci.yml#L994-L1001](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/ci.yml#L994-L1001) [.github/workflows/docs-update.yml#L111-L129](https://github.com/pydantic/pydantic/blob/29933d1c8cfc882a7640f4d831b09381b39aa311/.github/workflows/docs-update.yml#L111-L129)

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)
