Sign in Get 3 free credits

Try a job or a niche: tiktok captions, study notes, excel formulas. Press Esc to close.

Datamodel code generator

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

In detail

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.

Safety check

  • Not rated by Claude yet. We only sell skills Claude has read and rated 7 out of 10 or higher, so this one is a free link to its author.

An automated scan lowers risk but cannot promise zero risk. How we check skills

Preview

The first lines of SKILL.md
---
name: datamodel-code-generator
description: >
  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.
license: MIT
metadata:
  status: experimental
---

# datamodel-code-generator

## Why use this CLI

Use `datamodel-codegen` whenever a schema, API spec, sample data file, or existing Python model object exists.

The CLI handles refs, enums, nested models, unions, `allOf`, `oneOf`, `anyOf`, and model reuse better than hand-written code.

Do not hand-write generated models first.

## Availability check

Check one-shot execution first:

```bash
uvx --from datamodel-code-generator datamodel-codegen --help
```

If `uvx` is unavailable:

...

From datamodel-code-generator's repository, MIT licence.

Related skills

  • Checked

    Supabase auth and database

    Builds with Supabase auth, database, storage and edge functions while avoiding common security traps.

    by supabase 3.2k
    8/101 credit
  • Checked

    AWS schema conversion

    Runs AWS DMS Schema Conversion projects to move database schemas between engines and convert SQL to match.

    by aws 3.7k
    7/101 credit
  • Checked

    Firebase Done Right

    Builds Firebase apps with safe security rules, data models that scale and reliable Cloud Functions.

    by ericrisco 691
    7/101 credit
  • Checked

    Google Workspace API Setup

    Connects your server code to Gmail, Drive, Calendar and Sheets with safe service accounts and fewer quota errors.

    by ericrisco 691
    7/101 credit
  • Checked

    Supabase Backend Security

    Wires up Supabase auth, row level security, storage and realtime so your data stays private and queries stay fast.

    by ericrisco 691
    8/101 credit
  • Checked

    NestJS API endpoints

    Adds NestJS endpoints with proper validation, status codes and the traps that break startup fixed.

    by nestjs 176
    8/101 credit

Secure checkout

Credits

AUD

  1. 1Choose
  2. 2Pay on Square
  3. 3Credits added