Metadata-Version: 2.4
Name: valbridge-pydantic-extractor
Version: 0.4.1
Summary: Workspace-local Pydantic extraction utilities for valbridge
Project-URL: Homepage, https://github.com/vectorfy-co/valbridge
Project-URL: Documentation, https://github.com/vectorfy-co/valbridge
Project-URL: Repository, https://github.com/vectorfy-co/valbridge
Project-URL: Issues, https://github.com/vectorfy-co/valbridge/issues
Project-URL: Changelog, https://github.com/vectorfy-co/valbridge/blob/main/CHANGELOG.md
Author: vectorfyco
Maintainer: vectorfyco
License: MIT
Keywords: code-generation,extractor,introspection,json-schema,pydantic,valbridge,validation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: pydantic<2.13.0,>=2.12.0
Requires-Dist: valbridge-core<0.5.0,>=0.4.0
Description-Content-Type: text/markdown

# valbridge-pydantic-extractor

Workspace-local extraction utilities for turning Pydantic models into JSON Schema enriched for `valbridge`.

## Installation

```bash
pip install valbridge-pydantic-extractor
```

## CLI usage

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

The extractor prints JSON with:

- `schema`: the extracted schema document
- `diagnostics`: import or extraction diagnostics when the target cannot be resolved cleanly

## Options

- `--python-path <path>`: prepend an import path before loading the target module
- `--module-root <path>`: add one or more module roots for project-local imports
- `--stub-module <module>`: install placeholder modules for optional imports during extraction
- `--env KEY=VALUE`: inject environment variables before importing the model

## Notes

- the target must use `module:Class` format
- the target class must inherit from `pydantic.BaseModel`
- extracted output preserves `x-valbridge` annotations needed by downstream code generation
