datamodel-code-generator/datamodel-code-generator
Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAML/CSV.
Star History
Add Live Star History & Verified Badges to README.md
Keep your repository README looking professional and dynamic. As our continuous crawler records new stars, these official SVG badges update in real time with zero maintenance.
Renders your high-resolution star trajectory chart right inside your GitHub README or project docs.
[](https://githubrepo.cloud/repo/datamodel-code-generator/datamodel-code-generator?utm_source=readme_chart)
Compact Shields-style badges for your README header. Shows real-time stars and global ranking.
[](https://githubrepo.cloud/repo/datamodel-code-generator/datamodel-code-generator?utm_source=readme_badge) [](https://githubrepo.cloud/repo/datamodel-code-generator/datamodel-code-generator?utm_source=readme_badge) [](https://githubrepo.cloud/repo/datamodel-code-generator/datamodel-code-generator?utm_source=readme_badge)
Momentum
+101
STARS · LAST 30 DAYS
3
PER DAY
#252
MOST-STARRED Python
| Window | 7 days | 30 days | 90 days |
|---|---|---|---|
| Stars gained | +21 | +101 | +270 |
| Per day | 3 | 3 | 3 |
| Forks gained | +2 | +9 | +23 |
datamodel-code-generator gained 101 stars in the last 30 days, about 3 a day, and now has 4K. It is about 7 years old and has averaged roughly 575 stars a year. It ranks #252 among Python repositories and #1,571 across all languages on GitHubRepo.
Trending Record
1
DAYS ON TRENDING
#2466
BEST RANK
Sep 30, 2026
FIRST APPEARANCE
Active
STATUS TODAY
datamodel-code-generator has maintained a continuous presence across global trending indexes, peaking at #2466. Below is the 30-day activity profile:
💡 Overview
datamodel-code-generator is an open-source project written in Python: Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAML/CSV.
Engineered for speed, consistency, and developer ease, it solves common hurdles in code-generator, csv, dataclass. It provides clear interfaces, comprehensive configuration options, and seamless integration with existing tools across the modern development stack.
⚡ Key Features
Optimized execution pipeline written in Python for predictable speed.
Zero-friction configuration with comprehensive sensible defaults out of the box.
Cross-platform runtime support across Linux, macOS, and Windows environments.
Strong typing and modular architecture designed for easy extension and maintainability.
Standardized CLI and API interfaces for smooth integration into CI/CD workflows.
Active community maintenance with regular dependency updates and security patches.
📥 Installation
$ pip install datamodel-code-generator
⚙ System Requirements
Platforms
- • macOS
- • Linux
- • Windows
Runtime & Dependencies
Python >= 3.9, pip, virtualenv
Architecture
x86_64, ARM64 (Apple Silicon & Graviton)
🧠 How It Works
datamodel-code-generator coordinates its core functionality through a modular Python pipeline. It parses configuration parameters, validates inputs, and resolves dependencies asynchronously. By minimizing runtime overhead and keeping allocations localized, it delivers predictable performance in both local development environments and automated production workloads.
🎯 Production Use Cases
Production System Integration
Embed datamodel-code-generator into Python backend services to handle core application logic.
CI/CD Automated Pipelines
Run automated validation, builds, and integration suites during deployments.
Developer Tooling & Workflows
Accelerate developer onboarding with pre-configured project utilities.
Open Source Extension
Fork and customize internal modules under the repository's open MIT license.
🚀 Getting Started
Install datamodel-code-generator using your package manager: `pip install datamodel-code-generator`
Initialize your project workspace or configuration file for datamodel-code-generator.
Import datamodel-code-generator into your codebase or invoke it directly from your terminal.
Execute your test suite or run `datamodel-code-generator --help` to verify successful setup.
👍 Strengths
⚠️ Considerations
⇄ Alternatives & Direct Competitors
👥 Who Should Use This
Developers and engineering teams building with Python, seeking reliable, tested, and actively maintained tooling for production workloads.
🏆 Nearby in the Rankings
datamodel-code-generator/datamodel-code-generator is currently ranked #1,571 by stars across every repository tracked on GitHubRepo. These are adjacent projects:
| Rank | Repository | Language | Stars | Action |
|---|---|---|---|---|
| #1,566 | thoughtbot/suspenders | Ruby | ★ 4K | Compare ↗ |
| #1,567 | apache/httpd | C | ★ 4K | Compare ↗ |
| #1,568 | obsidian-tasks-group/obsidian-tasks | TypeScript | ★ 4K | Compare ↗ |
| #1,569 | svenfuchs/rails-i18n | Ruby | ★ 4K | Compare ↗ |
| #1,570 | qunitjs/qunit | JavaScript | ★ 4K | Compare ↗ |
| #1,571 | datamodel-code-generator/datamodel-code-generator This Project | Python | ★ 4K | |
| #1,572 | kubernetes/test-infra | Go | ★ 4K | Compare ↗ |
| #1,573 | stripe/stripe-php | PHP | ★ 4K | Compare ↗ |
| #1,574 | mahdibland/V2RayAggregator | Python | ★ 4K | Compare ↗ |
| #1,575 | knolleary/pubsubclient | C++ | ★ 4K | Compare ↗ |
| #1,576 | kumahq/kuma | Go | ★ 4K | Compare ↗ |
Frequently Asked Questions
What does datamodel-code-generator do? +
Generate Pydantic v2 models, dataclasses, TypedDict, and msgspec.Struct from OpenAPI, JSON Schema, GraphQL, Avro, Protobuf, and raw JSON/YAML/CSV.
What language is datamodel-code-generator written in? +
The primary language is Python. Topics include: code-generator, csv, dataclass, datamodel, fastapi.
Is datamodel-code-generator actively maintained? +
Yes, the last recorded push was on Sep 30, 2026 with 35 open issues being tracked.
How many stars does datamodel-code-generator have? +
datamodel-code-generator has 4,027 stars and 460 forks on GitHub.
How does datamodel-code-generator rank among GitHub repositories? +
With 4,027 stars, datamodel-code-generator/datamodel-code-generator is ranked #1,571 globally across all repositories tracked on GitHubRepo and #252 among Python projects.
What license is datamodel-code-generator distributed under? +
The repository reports a MIT license. Always verify the repository LICENSE file for legal terms.