Skip to main content

valbridge-pydantic-extractor

Extract valbridge-compatible schema data from existing Pydantic models for high-fidelity Zod generation.

PyPI License


Installation

pip install valbridge-pydantic-extractor
# or
uv add valbridge-pydantic-extractor

CLI usage

valbridge-pydantic-extractor app.models:User --python-path .

Output is JSON with:

  • schema -- the extracted JSON Schema document
  • diagnostics -- import or extraction diagnostics when the target cannot be resolved cleanly

Options

Flag Description
--python-path <path> Prepend an import path before loading the target module
--module-root <path> Add module roots for project-local imports
--stub-module <module> Install placeholder modules for optional imports
--env KEY=VALUE Inject environment variables before importing the model

Key behaviors

  • Target must use module:Class format
  • Target class must inherit from pydantic.BaseModel
  • Extracted output preserves x-valbridge annotations needed by downstream code generation
  • Emits diagnostics for Pydantic features that cannot be represented in JSON Schema

Related packages

Package Purpose
valbridge-pydantic Pydantic adapter (JSON Schema to Pydantic)
valbridge-core Core IR and JSON Schema parser
@vectorfyco/valbridge-zod-extractor TypeScript equivalent for Zod schemas

Learn more

Metadata

Release files for valbridge-pydantic-extractor 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for valbridge-pydantic-extractor 1.2.0
File Size Uploaded
valbridge_pydantic_extractor-1.2.0.tar.gz 8.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for valbridge-pydantic-extractor 1.2.0
File Interpreter ABI Platform
valbridge_pydantic_extractor-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 16.3 kB

Release files / valbridge_pydantic_extractor-1.2.0.tar.gz

Download URL valbridge_pydantic_extractor-1.2.0.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
583686158956f1b2751865a7ecba1c36eceab6e55b11c49c76b7570a44821ff2
BLAKE2b-256 checksum
How to use checksums
eb772cf41688c92770087c05c72c643db69b8e5c168db1a8c46466473eb1bc31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.

Transparency log

Release files / valbridge_pydantic_extractor-1.2.0-py3-none-any.whl

Download URL valbridge_pydantic_extractor-1.2.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dddb0e4f32c3b1a978142606cd06090c27468156a39ccd276da841a1022af7c6
BLAKE2b-256 checksum
How to use checksums
2a35f7977a080f2111257ecd67c10855ff316b65acb29d705caa7318206eb738
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

2 release files

1.0.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page