JSON Schema to Pydantic model conversion library
Project description
Pydantic JSON Schema
Convert JSON Schema definitions into Pydantic models with runtime validation.
Installation
uv add pydantic-jsonschema
Requires Python 3.12+. See the installation guide for optional format validator extras.
Quick Start
from pydantic_jsonschema import Schema, to_model
schema = Schema.model_validate({
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer", "minimum": 0},
},
"required": ["name"],
})
User = to_model(schema, model_name="User")
user = User(name="Alice", age=30)
print(user.model_dump())
#> {'name': 'Alice', 'age': 30}
Documentation
https://danipulok.github.io/pydantic-jsonschema/
License
MIT License - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pydantic_jsonschema-0.0.1.tar.gz.
File metadata
- Download URL: pydantic_jsonschema-0.0.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e58e9b34b30d3bb3264c4e9386f53918f194f3982817200f2bfa0b3d0b980f39
|
|
| MD5 |
f12e0d00e639b34f56aa193836300ceb
|
|
| BLAKE2b-256 |
ac00dd159129d5d7cf1baf1259c56d20c74ca8a94328bc86a16a1fe95c4c49ad
|
Provenance
The following attestation bundles were made for pydantic_jsonschema-0.0.1.tar.gz:
Publisher:
release.yml on Danipulok/pydantic-jsonschema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantic_jsonschema-0.0.1.tar.gz -
Subject digest:
e58e9b34b30d3bb3264c4e9386f53918f194f3982817200f2bfa0b3d0b980f39 - Sigstore transparency entry: 1740806194
- Sigstore integration time:
-
Permalink:
Danipulok/pydantic-jsonschema@bff201740286bcc63953d3f31640403c94847166 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Danipulok
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bff201740286bcc63953d3f31640403c94847166 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pydantic_jsonschema-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pydantic_jsonschema-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68bcac68a12d3206876459f6a17724743f53f2a2ce2084cfa7757de6cc2a4cb7
|
|
| MD5 |
eec5e5e7101f7302f9e07c12cc3931d9
|
|
| BLAKE2b-256 |
95f9fdb50b8259d81fa95504a88972969e0a993e857edf917e1eb4cb50d12318
|
Provenance
The following attestation bundles were made for pydantic_jsonschema-0.0.1-py3-none-any.whl:
Publisher:
release.yml on Danipulok/pydantic-jsonschema
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantic_jsonschema-0.0.1-py3-none-any.whl -
Subject digest:
68bcac68a12d3206876459f6a17724743f53f2a2ce2084cfa7757de6cc2a4cb7 - Sigstore transparency entry: 1740806207
- Sigstore integration time:
-
Permalink:
Danipulok/pydantic-jsonschema@bff201740286bcc63953d3f31640403c94847166 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/Danipulok
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@bff201740286bcc63953d3f31640403c94847166 -
Trigger Event:
push
-
Statement type: