jsonschema-pydantic
Simple transform of jsonschema to pydantic models.
Supported jsonschema features
- primitive types
- objects
- arrays
- nested objects
- optional fields
- default values
Install
pip install jsonschema-pydantic
Usage
from jsonschema_pydantic import jsonschema_to_pydantic
jsonschema = {
"type": "object",
"properties": {
"name": {"type": "string"},
"age": {"type": "integer"},
},
"required": ["name"],
}
pydantic_model = jsonschema_to_pydantic(jsonschema)
Development
Run pytest test suite:
make test
Linting
Run all linters
make lint
Formatting
Format python code:
make fmt
Documentation
Generate documentation:
make docs
Contributions
Read the CONTRIBUTING.md file.
Metadata
Release files for jsonschema-pydantic 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jsonschema_pydantic-0.6.tar.gz | 6.2 kB | Without provenance | Details for jsonschema_pydantic-0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jsonschema_pydantic-0.6-py3-none-any.whl | Python 3 | none | any | Details for jsonschema_pydantic-0.6-py3-none-any.whl |
Total release size: 10.4 kB
Release files / jsonschema_pydantic-0.6.tar.gz
| Download URL | jsonschema_pydantic-0.6.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6069a8929a333a7c7ea8510e9de50f062e747e655e6ba106da5af1981f995270
|
|
BLAKE2b-256 checksum How to use checksums |
d43e088097e87f6b24b162cd42b090b1d3891b68e9dac96ceeac8ed5dff94db7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Release files / jsonschema_pydantic-0.6-py3-none-any.whl
| Download URL | jsonschema_pydantic-0.6-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
98385ed53ab87598665956b43756746350e2b60411a38381231f9703d36e40eb
|
|
BLAKE2b-256 checksum How to use checksums |
e767cbb63be985519b51d13499e726db2c960069588d5c2c479859856158b4de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.1
|
Security for jsonschema-pydantic 0.6
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.