Project Icon

datamodel-code-generator

Create Python Models from OpenAPI Files Using Pydantic and Dataclasses

Product DescriptionDatamodel-code-generator converts OpenAPI files into Python models like Pydantic v1 and v2, dataclasses, and TypedDicts. It supports various input formats including OpenAPI, JSON Schema, and GraphQL schemas. Outputs range from Pydantic BaseModel to custom Jinja2 templates. Installation is straightforward with pip or Docker, and it offers customization options like HTTP headers for processing remote files. Widely used in notable open-source projects, it improves workflow efficiency through automated model generation.
Project Details