datamodel-code-generator
Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAML/CSV, plus FastAPI servers and Python clients from OpenAPI.
- 4.1k
- Python
- MIT
- 4 h ago
Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAML/CSV, plus FastAPI servers and Python clients from OpenAPI.
Automatic generation of marshmallow schemas from dataclasses.
Dataclasses manipulated as numpy arrays (with batching, reshape, slicing,...)
Lightweight implementation of Django-like `TextChoices` and `IntegerChoices`.
:white_heart: Created for first teaching experience at Upschool