GitHub
github.com › koxudaxi › datamodel-code-generator
GitHub - koxudaxi/datamodel-code-generator: Python data model generator (Pydantic, dataclasses, TypedDict, msgspec) from OpenAPI, JSON Schema, GraphQL, and raw data (JSON/YAML/CSV). · GitHub
Python data model generator (Pydantic, dataclasses, TypedDict, msgspec) from OpenAPI, JSON Schema, GraphQL, and raw data (JSON/YAML/CSV). - koxudaxi/datamodel-code-generator
Starred by 3.8K users
Forked by 430 users
Languages Python
PyPI
pypi.org › project › datamodel-code-generator
datamodel-code-generator · PyPI
Python dictionary · pydantic v2 BaseModel · pydantic v2 dataclass · dataclasses · TypedDict · msgspec Struct · Generate a prompt to ask LLMs about CLI options: datamodel-codegen --generate-prompt "Best options for Pydantic v2?" | claude -p · See LLM Integration for more examples.
» pip install datamodel-code-generator
Koxudaxi
koxudaxi.github.io › datamodel-code-generator
Redirecting to datamodel-code-generator.koxudaxi.dev
Redirecting to datamodel-code-generator.koxudaxi.dev...
Koxudaxi
koxudaxi.github.io › datamodel-code-generator › custom_template
Custom template - datamodel-code-generator
$ datamodel-codegen --input {your_input_file} --output {your_output_file} --custom-template-dir {your_custom_template_directory} Replace {your_input_file}, {your_output_file}, and {your_custom_template_directory} with the appropriate paths. Let's say you want to generate a custom Python data model from a JSON Schema file called person.json.
Docker Hub
hub.docker.com › r › koxudaxi › datamodel-code-generator
koxudaxi/datamodel-code-generator - Docker Image
usage: datamodel-codegen [options] Generate Python data models from schema definitions or structured data Options: --http-headers HTTP_HEADER [HTTP_HEADER ...] Set headers in HTTP requests to the remote host.
GitHub
github.com › koxudaxi › datamodel-code-generator › releases
Releases · koxudaxi/datamodel-code-generator
Python data model generator (Pydantic, dataclasses, TypedDict, msgspec) from OpenAPI, JSON Schema, GraphQL, and raw data (JSON/YAML/CSV). - Releases · koxudaxi/datamodel-code-generator
Author koxudaxi
Koxudaxi
datamodel-code-generator.koxudaxi.dev
datamodel-code-generator - datamodel-code-generator
This code generator creates pydantic model from an openapi file and others.
Debian Manpages
manpages.debian.org › testing › datamodel-codegen › datamodel-codegen.1.en.html
datamodel-codegen(1) — datamodel-codegen — Debian testing — Debian Manpages
datamodel-codegen [options] Generate Python data models from schema definitions or structured data · For detailed usage, see: https://koxudaxi.github.io/datamodel-code-generator · --additional-imports ADDITIONAL_IMPORTS · Custom imports for output (delimited list input).
GitHub
github.com › tomercagan › datamodel-code-generator
GitHub - tomercagan/datamodel-code-generator: Pydantic model generator for easy conversion of JSON, OpenAPI, JSON Schema, and YAML data sources.
This code generator creates pydantic model from an openapi file and others. See documentation for more details. ... If you want to resolve $ref for remote files then you should specify http extra option.
Author tomercagan
Stack Overflow
stackoverflow.com › questions › 77064412 › datamodel-code-generator-cant-handle-json-compound-schema-document
jsonschema - datamodel-code-generator can't handle JSON Compound Schema Document - Stack Overflow
I ran on the CLI datamodel-codegen --input schema.json --input-file-type jsonschema --output model.py. I expected the generation of a pydantic model.
PyPI
pypi.org › project › improved-datamodel-codegen
improved-datamodel-codegen · PyPI
This code generator creates pydantic model from an openapi file and others. See documentation for more details. ... If you want to resolve $ref for remote files then you should specify http extra option.
» pip install improved-datamodel-codegen
Tessl
tessl.io › registry › tessl › pypi-datamodel-code-generator
0.33.0 • pypi-datamodel-code-generator • tessl • Registry • Tessl
January 29, 2026 - The primary programmatic interface for generating Python data models with extensive configuration options for input sources, output formats, and code generation behavior. def generate( input_: Path | str | ParseResult | Mapping[str, Any], *, ...
GitHub
github.com › guardicore › datamodel-code-generator
GitHub - guardicore/datamodel-code-generator · GitHub
usage: datamodel-codegen [options] Generate Python data models from schema definitions or structured data Options: --additional-imports ADDITIONAL_IMPORTS Custom imports for output (delimited list input).
Author guardicore
GitHub
github.com › koxudaxi › datamodel-code-generator › issues › 331
Dynamic creation of BaseModel classes at runtime · Issue #331 · koxudaxi/datamodel-code-generator
February 11, 2021 - But it is tightly coupled with the rendering of Python files that contain the BaseModel child classes source code. I would like to be able to intercept this, and 'render' that structure differently. The most important case would be to generate a Python class dynamically (which should be relatively easy, using type(...). Another use-case (although less important) would be to 'translate' the schema into a different format (I would have a use for Avro, for example). Basically, datamodel-code-generator could become sort of an any-to-any schema translator.
Author makkus
Koxudaxi
datamodel-code-generator.koxudaxi.dev › cli-reference › base-options
📁 Base Options - datamodel-code-generator
Specify the input file type for code generation. The --input-file-type flag explicitly sets the input format. ... For example, if you have a JSON Schema written in YAML format, use --input-file-type jsonschema, not --input-file-type yaml. The yaml type treats the file as raw data and infers a schema from it. ... # generated by datamodel-codegen: # filename: pet.json # timestamp: 2019-07-26T00:00:00+00:00 from __future__ import annotations from pydantic import BaseModel class Pet(BaseModel): name: str age: int class Model(BaseModel): Pet: Pet