Extract valbridge-compatible schema data from existing Pydantic models for high-fidelity Zod generation.
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 documentdiagnostics-- 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:Classformat - Target class must inherit from
pydantic.BaseModel - Extracted output preserves
x-valbridgeannotations 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)
| File | Size | Uploaded | |
|---|---|---|---|
| valbridge_pydantic_extractor-1.2.0.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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 logRelease 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