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
[tool.datamodel-codegen] input = "schema.yaml" output = "src/models.py" output-model-type = "pydantic_v2.BaseModel"
Starred by 3.8K users
Forked by 429 users
Languages Python
Koxudaxi
koxudaxi.github.io › datamodel-code-generator
Redirecting to datamodel-code-generator.koxudaxi.dev
Redirecting to datamodel-code-generator.koxudaxi.dev
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
koxudaxi.github.io › datamodel-code-generator › custom_template
Custom template - datamodel-code-generator
# generated by datamodel-codegen: # filename: person.json # timestamp: 2023-04-09T05:36:24+00:00 from __future__ import annotations from typing import Optional from pydantic import BaseModel # This is a custom comment generated with custom_template!!
Debian Manpages
manpages.debian.org › unstable › datamodel-codegen › datamodel-codegen.1.en.html
datamodel-codegen(1) — datamodel-codegen — Debian unstable — Debian Manpages
2 weeks ago - Use a named profile from pyproject.toml [tool.datamodel-codegen.profiles.<name>] --version · show version · --watch · Watch input file(s) for changes and regenerate output automatically · --watch-delay WATCH_DELAY · Debounce delay in seconds for watch mode (default: 0.5) -h, --help · show this help message and exit · Documentation: https://datamodel-code-generator.koxudaxi.dev GitHub: https://github.com/koxudaxi/datamodel-code-generator ·
CodeSandbox
codesandbox.io › p › github › ormwish › datamodel-code-generator
datamodel-code-generator
CodeSandbox is a cloud development platform that empowers developers to code, collaborate and ship projects of any size from any device in record time.
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
The OP did file an issue for this as recommended in the question comments: https://github.com/koxudaxi/datamodel-code-generator/issues/1541
Koxudaxi
koxudaxi.github.io › datamodel-code-generator › openapi
Generate from OpenAPI - datamodel-code ... - GitHub Pages
# generated by datamodel-codegen: # filename: api.yaml # timestamp: 2020-06-02T05:28:24+00:00 from __future__ import annotations from typing import List, Optional from pydantic import AnyUrl, BaseModel, Field class Pet(BaseModel): id: int name: str tag: Optional[str] = None class Pets(BaseModel): __root__: List[Pet] class Error(BaseModel): code: int message: str class Api(BaseModel): apiKey: Optional[str] = Field( None, description='To be used as a dataset parameter value' ) apiVersionNumber: Optional[str] = Field( None, description='To be used as a version parameter value' ) apiUrl: Optional[AnyUrl] = Field( None, description="The URL describing the dataset's fields" ) apiDocumentationUrl: Optional[AnyUrl] = Field( None, description='A URL to the API console for each API' ) class Apis(BaseModel): __root__: List[Api]
Debian Manpages
manpages.debian.org › testing › datamodel-codegen › datamodel-codegen.1.en.html
datamodel-codegen(1) — datamodel-codegen — Debian testing — Debian Manpages
Use a named profile from pyproject.toml [tool.datamodel-codegen.profiles.<name>] --version · show version · --watch · Watch input file(s) for changes and regenerate output automatically · --watch-delay WATCH_DELAY · Debounce delay in seconds for watch mode (default: 0.5) -h, --help · show this help message and exit · Documentation: https://koxudaxi.github.io/datamodel-code-generator GitHub: https://github.com/koxudaxi/datamodel-code-generator ·
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
PyPI
pypi.org › project › datamodel-code-generator › 0.2.1
datamodel-code-generator · PyPI
$ git clone git@github.com:koxudaxi/datamodel-code-generator.git $ pip install -e datamodel-code-generator
» pip install datamodel-code-generator
Koxudaxi
koxudaxi.github.io › datamodel-code-generator › custom-formatters
Custom formatters - datamodel-code-generator
$ datamodel-codegen --input {your_input_file} --output {your_output_file} --custom-formatters "{path_to_your_module}.your_module"
Ubuntu
manpages.ubuntu.com › manpages › resolute › man1 › datamodel-codegen.1.html
Ubuntu Manpage: datamodel-codegen - pydantic code generator from OpenAPI and more
`$ pip install 'datamodel-code-generator[debug]'`) --disable-warnings disable warnings --generate-cli-command Generate CLI command from pyproject.toml configuration and exit --generate-pyproject-config Generate pyproject.toml configuration from the provided CLI arguments and exit --ignore-pyproject Ignore pyproject.toml configuration --no-color disable colorized output --profile PROFILE Use a named profile from pyproject.toml [tool.datamodel-codegen.profiles.<name>] --version show version --watch Watch input file(s) for changes and regenerate output automatically --watch-delay WATCH_DELAY Debounce delay in seconds for watch mode (default: 0.5) -h, --help show this help message and exit Documentation: https://koxudaxi.github.io/datamodel-code-generator GitHub: https://github.com/koxudaxi/datamodel-code-generator datamodel-codegen 0.45.0-1 December 2025 ·
GitHub
github.com › koxudaxi › datamodel-code-generator › blob › main › README.md
datamodel-code-generator/README.md at main · koxudaxi/datamodel-code-generator
pip install 'datamodel-code-generator[http]' datamodel-codegen --url https://example.com/api/openapi.yaml --output model.py
Author koxudaxi
GitHub
github.com › koxudaxi › datamodel-code-generator › blob › main › docs › using_as_module.md
datamodel-code-generator/docs/using_as_module.md at main · koxudaxi/datamodel-code-generator
from datamodel_code_generator import InputFileType, generate, GenerateConfig, GeneratedModules # Your OpenAPI specification (string, Path, or dict) openapi_spec: str = "..." # Replace with your actual OpenAPI spec # Schema that generates multiple modules (e.g., with $ref to other files) config = GenerateConfig( input_file_type=InputFileType.OpenAPI, ) result: str | GeneratedModules = generate(openapi_spec, config=config) if isinstance(result, dict): for module_path, content in result.items(): print(f"Module: {'/'.join(module_path)}") print(content) print("---") else: print(result)
Author koxudaxi
Anaconda.org
anaconda.org › conda-forge › datamodel-code-generator
datamodel-code-generator - conda-forge
January 7, 2026 - Organization created on Apr 11, 2015 · A community-led collection of recipes, build infrastructure, and distributions for the conda package manager
GitHub
github.com › koxudaxi › datamodel-code-generator › issues › 215
Support generating models from json-schemas defined in multiple files · Issue #215 · koxudaxi/datamodel-code-generator
September 14, 2020 - Is your feature request related to a problem? Please describe. Now the tool cli API supports only single file as input. I'd suggest to extend it to have directory as as option. This would help with generating models from json-schema (or ...
Author mikhail-sakhnov
GitHub
github.com › koxudaxi › datamodel-code-generator › issues › 763
datamodel-codegen creates models with duplicate fields · Issue #763 · koxudaxi/datamodel-code-generator
May 9, 2022 - Describe the bug I am trying to auto-generate schema models using datamodel-codegen on an openapi documentation:- https://d3a0d0y2hgofx6.cloudfront.net/openapi/en-us/dsp/3-1/openapi.yaml The generated schema models has duplicate fields w...
Author pritishperpetua
Docker Hub
hub.docker.com › r › koxudaxi › datamodel-code-generator
koxudaxi/datamodel-code-generator - Docker Image
`$ pip install 'datamodel-code-generator[debug]'`) --disable-warnings disable warnings --no-color disable colorized output --version show version -h, --help show this help message and exit Copy · This code generator creates FastAPI app from an openapi file. https://github.com/koxudaxi/...