Skip to main content

Workspace-local Pydantic extraction utilities for valbridge

Project description

valbridge-pydantic-extractor

Extract JSON Schema from existing Pydantic models, enriched with x-valbridge annotations for high-fidelity cross-language 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

valbridge_pydantic_extractor-1.0.2.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

valbridge_pydantic_extractor-1.0.2-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file valbridge_pydantic_extractor-1.0.2.tar.gz.

File metadata

File hashes

Hashes for valbridge_pydantic_extractor-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d0d5e44bf49f497baa7946097809b2a34a57aed21a3bd341a1b7d1f4512afd13
MD5 e35c570412a541ec23a8a4d5f2cb6343
BLAKE2b-256 7cf7d707b2fafdfbe891ad3cb2a310b661dd8b3759f09d17bafdbb6b95844e01

See more details on using hashes here.

Provenance

The following attestation bundles were made for valbridge_pydantic_extractor-1.0.2.tar.gz:

Publisher: release-please.yml on vectorfy-co/valbridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file valbridge_pydantic_extractor-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for valbridge_pydantic_extractor-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 13a8a6ac3bce9035da9ed5255caff78cbd90c186ad15da5732940e06bd6d0fba
MD5 f023d0b0165929b0a6d3742233f24b8d
BLAKE2b-256 32f2b0a3b501d7a9a850d7f190d9f9ce078fda00173aabd16aaf2b1192dc52b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for valbridge_pydantic_extractor-1.0.2-py3-none-any.whl:

Publisher: release-please.yml on vectorfy-co/valbridge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page