# Datamodel code generator

> Helps you get Python data models, Pydantic models, dataclasses, TypedDicts, msgspec structs, or type-safe Python classes generated from OpenAPI, AsyncAPI.

- Page: https://youraiskill.com/skill/datamodel-code-generator-datamodel-code-generator
- What it does: Use this skill when the user wants Python data models, Pydantic models, dataclasses, TypedDicts, msgspec structs, or type-safe Python classes generated from OpenAPI, AsyncAPI, JSON Schema, GraphQL, JSON/YAML/CSV sample data, MCP tool schemas, Protocol Buffers, XML Schema, Apache Avro, or existing Python model objects. It also generates, experimentally, a typed HTTP client (SDK) or a FastAPI server from OpenAPI and a WebSocket or server-sent-event client from AsyncAPI. Use it for requests such as "Pydantic models from this schema", "types for this API", "parse this JSON into classes", "a Python client for this OpenAPI spec", or "a FastAPI server from this spec". Prefer the datamodel-codegen CLI over hand-written model, client, or server code whenever an input schema, API spec, sample data file, or Python model object exists.
- Niches: backend, coding, data
- Licence: MIT
- Status: Free on GitHub: not rated 7 or higher by Claude yet, or it does something a person should look at first (for example runs programs or calls the internet), or its licence or authorship needs a look. Never sold.
- Contents: instructions and reference files only (4 files)

To add it, see https://youraiskill.com/guides/how-to-add-a-skill-to-claude
