{"repo":"koxudaxi/datamodel-code-generator","free":true,"listed":false,"github":"https://github.com/koxudaxi/datamodel-code-generator","clone":"git clone https://github.com/koxudaxi/datamodel-code-generator.git","description":"Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAML/CSV.","language":"Python","stars":4003,"topics":["openapi","code-generator","python","pydantic","generator","fastapi","json-schema","datamodel","swagger","yaml"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"datamodel-code-generator 🚀 Generate Python data models from schema definitions in seconds. 📚 Documentation · 🧪 Playground · 💼 Lead maintainer available for work [!NOTE] Playground privacy: Generation runs locally in your browser with Pyodide. Your schema and options are not sent to a backend. Shared repro URLs encode them in the URL fragment ( #state=... ), which browsers do not send to the server; the full URL can still be stored in your browser history or wherever you share it. ✨ What it does Pick any one of the supported inputs and pick the Python model style you want as output. --input-model path/to/file.py:ClassName can even retarget an existing Pydantic, dataclass, or TypedDict class defined in another Python file to a different output type. - 📄 Converts OpenAPI 3 , AsyncAPI , JSON Schema , Apache Avro , XML Schema , Protocol Buffers/gRPC , GraphQL , MCP tool schemas , and raw data (JSON/YAML/CSV) into Python models - 🐍 Generates from existing Python types (Pydantic, dataclass, TypedDict) via --input-model - 🎯 Generates Pydantic v2 , Pydantic v2 dataclass , dataclasses , TypedDict , or msgspec output - 🔗 Handles complex schemas: $ref , allOf , oneOf , anyOf , enums, and nested types - ✅ Produces type-safe, validated code ready for your IDE and type checker --- 📦 Installation Recommended for standalone CLI use: Conda users can install from conda-forge: For projects that should pin the generator version, add it as a development dependency instead: [!NOTE] Communi","default_branch":null,"files":null,"tree":[],"storefront":"/r/koxudaxi","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/koxudaxi/datamodel-code-generator/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}