{
 "kind": "tool",
 "slug": "datamodel-code-generator",
 "path": "tools/datamodel-code-generator/",
 "name": "datamodel-code-generator",
 "maker": null,
 "density": "basic",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "Languages, types and runtimes",
   "tools/languages-types/"
  ]
 ],
 "lead": "Generates Pydantic models and dataclasses from OpenAPI, JSON Schema or JSON.",
 "chips": [
  {
   "label": "Languages, types and runtimes",
   "path": "tools/languages-types/"
  },
  {
   "label": "PYPI"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "pip install datamodel-code-generator"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/datamodel-code-generator/datamodel-code-generator"
  },
  {
   "label": "Website",
   "href": "https://github.com/datamodel-code-generator/datamodel-code-generator"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": null,
   "note": "License from PyPI license expression.",
   "src": "https://github.com/datamodel-code-generator/datamodel-code-generator"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 24, 2026",
   "note": "Latest GitHub release Nov 24, 2026. ",
   "src": "https://github.com/datamodel-code-generator/datamodel-code-generator"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "1 projects",
   "status": "info",
   "sub": "#56 of 70 in its category",
   "note": "Dependency in 1 public GitHub projects set up for AI coding agents that we scanned (0.0%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Official agent skills",
   "status": "yes",
   "sub": "1 from the makers",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": null
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What datamodel-code-generator does",
   "parts": [
    {
     "t": "prose",
     "text": "Generates Pydantic models and dataclasses from OpenAPI, JSON Schema or JSON."
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "datamodel-code-generator popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "52",
       "of": "/ 100",
       "l": "Gid Score, #1774 overall"
      },
      {
       "n": "4.6M",
       "l": "downloads a week, pypi"
      },
      {
       "n": "4,064",
       "l": "GitHub stars"
      },
      {
       "n": "1",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How datamodel-code-generator is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "datamodel-code-generator is a dependency in 1 of the 6,258 public GitHub projects set up for AI coding agents that we scanned, too few to describe it from them alone. Our scan also samples projects by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750); counting those, it appears in 22 projects, and what it is used with below comes from all of them.",
      "Projects that use it most often also use FastAPI (90.9%), NumPy (90.9%), OpenAI Python Library (86.4%)."
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 90.9% of its projects",
       "v": "FastAPI",
       "path": "tools/fastapi/"
      },
      {
       "l": "In 90.9% of its projects",
       "v": "NumPy",
       "path": "tools/numpy/"
      },
      {
       "l": "In 86.4% of its projects",
       "v": "OpenAI Python Library",
       "path": "tools/openai-pypi/"
      },
      {
       "l": "In 86.4% of its projects",
       "v": "Pydantic",
       "path": "tools/pydantic/"
      },
      {
       "l": "In 86.4% of its projects",
       "v": "Hugging Face Hub",
       "path": "tools/huggingface-hub/"
      },
      {
       "l": "In 81.8% of its projects",
       "v": "tiktoken (Python)",
       "path": "tools/tiktoken-pypi/"
      },
      {
       "l": "In 77.3% of its projects",
       "v": "python-dotenv",
       "path": "tools/python-dotenv/"
      },
      {
       "l": "In 77.3% of its projects",
       "v": "PyYAML",
       "path": "tools/pyyaml/"
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "usage",
   "h2": "More about datamodel-code-generator",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/koxudaxi",
        "Polar: https://polar.sh/koxudaxi",
        "7 GitHub sponsors"
       ]
      },
      {
       "title": "Agent Skills for it",
       "path": "skills/",
       "items": [
        ": Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAM"
       ]
      },
      {
       "title": "More in Languages, types and runtimes",
       "path": "tools/languages-types/",
       "items": [
        {
         "text": "TypeScript",
         "path": "tools/typescript/"
        },
        {
         "text": "tsx",
         "path": "tools/tsx/"
        },
        {
         "text": "ts-node",
         "path": "tools/ts-node/"
        },
        {
         "text": "jiti",
         "path": "tools/jiti/"
        },
        {
         "text": "vue-tsc",
         "path": "tools/vue-tsc/"
        },
        {
         "text": "Cloudflare Workers Types",
         "path": "tools/cloudflare-workers-types/"
        },
        {
         "text": "mypy",
         "path": "tools/mypy/"
        },
        {
         "text": "tsconfig-paths",
         "path": "tools/tsconfig-paths/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "datamodel-code-generator",
       "me": true,
       "facts": [
        "MIT",
        "Gid 52",
        "4.6M/wk"
       ]
      }
     ],
     "more": "Compare datamodel-code-generator with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "install",
     "intro": "Install it.",
     "code": "pip install datamodel-code-generator"
    },
    {
     "t": "gap",
     "text": "No step-by-step start for datamodel-code-generator yet: we have not written its hand-checked card."
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "pypi datamodel-code-generator"
  ],
  [
   "Category",
   "Languages, types and runtimes"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Gid Score",
   "51.8"
  ],
  [
   "Rank in category",
   "#56 of 70"
  ],
  [
   "GitHub",
   "datamodel-code-generator/datamodel-code-generator"
  ],
  [
   "Last change",
   "Nov 24, 2026"
  ]
 ],
 "good": [],
 "checked_line": "From the package registry, GitHub and our scan of public agent projects; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/datamodel-code-generator.png"
}