DC

datamodel-code-generator/datamodel-code-generator

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

4천 stars 품질 77 트렌드 48MIT

Pydantic v2 모델, 데이터클래스, TypedDict, msgspec을 생성하세요. OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, 그리고 RAW JSON/YAML/CSV 등에서 구조체를 생성합니다.

개요

🚀 스키마 정의로부터 몇 초 만에 파이썬 데이터 모델을 생성할 수 있습니다. 📚 문서 · 🧪 놀이터 · 💼 작업 가능한 수석 유지보수 Playground 프라이버시: 생성은 Pyodide를 통해 브라우저에서 로컬로 실행됩니다. 스키마와 옵션은 백엔드로 전송되지 않습니다. 공유 복제 URL은 브라우저가 서버에 보내지 않는 URL 조각(#state=...)에 인코딩합니다; 전체 URL은 여전히 브라우저 기록이나 공유하는 곳에 저장할 수 있습니다. 지원되는 입력 중 하나를 선택하고, 원하는 Python 모델 스타일을 출력으로 선택하세요. --input-model path/to/file.py:ClassName은 다른 Python 파일에서 정의된 기존 Pydantic, dataclass, 또는 TypedDict 클래스를 다른 출력 타입으로 리타겟팅할 수도 있습니다.

개요(AI 번역)

🚀 스키마 정의로부터 몇 초 만에 파이썬 데이터 모델을 생성할 수 있습니다.

📚 문서 · 🧪 놀이터 · 💼 업무 가능한 수석 유지보수

[! 참고] 플레이그라운드 프라이버시: 생성은 Pyodide를 사용해 브라우저에서 로컬로 실행됩니다. 스키마와 옵션은 전송되지 않습니다 백엔드. 공유 복제 URL은 브라우저가 서버에 보내지 않는 URL 조각(#state=...)에 인코딩합니다; 전체 URL은 여전히 브라우저 기록이나 공유하는 곳에 저장될 수 있습니다.

✨ 그것이 하는 일들

지원되는 입력 중 하나를 선택해서 원하는 Python 모델 스타일을 출력으로 선택하세요. --input-model path/to/file.py:ClassName은 기존의 Pydantic, dataclass, 또는 TypedDict 클래스를 재타겟팅할 수도 있습니다 다른 Python 파일에서 다른 출력 유형으로 변환할 수 있습니다.

  • 📄 OpenAPI 3**, AsyncAPI, JSON 스키마, Apache Avro, XML 스키마, 프로토콜 버퍼/gRPC, GraphQL, MCP 도구 스키마 및 원시 데이터(JSON/YAML/CSV)를 Python 모델로 변환합니다
  • 🐍 기존 Python 타입(Pydantic, dataclass, TypedDict)에서 --input-model를 통해 생성
  • 🎯 Pydantic v2, Pydantic v2 데이터클래스, dataclasses, TypedDict, 또는 msgspec 출력 생성

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.

README

원문 README의 일부입니다. 원문 보기.

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
GitHub에서 전체 README 보기

추천 도구

다른 키워드를 입력하거나 필터를 제거해 보세요.

설치

npx skillfish add datamodel-code-generator/datamodel-code-generator
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →