What is datamodel-code-generator?
datamodel-code-generator generates Python data models from schema definitions: OpenAPI 3, AsyncAPI, JSON Schema, Apache Avro, XML Schema, Protocol Buffers, GraphQL, MCP tool schemas and raw JSON, YAML or CSV. Output can be Pydantic v2 models or dataclasses, standard dataclasses, TypedDict or msgspec, and it handles $ref, allOf, oneOf, anyOf and nested types. It installs with uv or conda and has an in-browser playground. MIT-licensed.
What is the best alternative to datamodel-code-generator?
Anthropic Skills is the top-rated alternative to datamodel-code-generator in the Dev Tooling category.
Is there a free alternative to datamodel-code-generator?
Anthropic Skills is a free, open-source alternative.
Is datamodel-code-generator open source?
Yes, datamodel-code-generator is open source on GitHub, licensed under MIT.
Why do users look for alternatives to datamodel-code-generator?
The domain contract is still undefined and you expect code generation to decide it.. You need every generated output type to perform identical runtime validation automatically..