awesome-repositories.com
Blog
MCP
awesome-repositories.com

Descoperă cele mai bune repository-uri open source cu căutare AI.

ExploreazăCăutări recomandateAlternative open-sourceSoftware self-hostedBlogHartă site
ProiectDespreCum realizăm clasamentulPresăServer MCP
LegalConfidențialitateTermeni
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
koxudaxi avatar

koxudaxi/datamodel-code-generator

0
View on GitHub↗
3,943 stele·449 fork-uri·Python·MIT·4 vizualizăridatamodel-code-generator.koxudaxi.dev↗

Datamodel Code Generator

This project is a command-line schema-to-code converter designed to transform diverse data specifications into type-safe Python data structures. It functions as a generator for Pydantic models, dataclasses, and typed dictionaries, enabling developers to maintain synchronization between evolving data contracts and application code. By parsing formats such as JSON Schema, OpenAPI, AsyncAPI, Protobuf, and Avro, the tool automates the creation of native classes that reflect the constraints and metadata defined in the source specifications.

The generator distinguishes itself through a highly configurable pipeline that manages complex schema relationships, including circular dependency resolution and reference-based model linking. It provides extensive control over the generated output, allowing for custom base class definitions, field aliasing, and strict type enforcement. Users can tailor the rendering logic to match specific project style standards, ensuring that generated code is modular, formatted, and ready for integration into existing codebases.

Beyond basic generation, the tool supports automated workflows by integrating directly into continuous integration and deployment pipelines. It includes features for schema change monitoring, model validation, and configuration management, which ensure that generated models remain consistent with source definitions across different environments. The project is distributed as a command-line utility, with support for project-level configuration files to facilitate repeatable and auditable generation tasks.

Features

  • Schema-Driven Code Generators - Transforms structured data specifications into native, type-safe Python classes and data structures.
  • JSON Schema to Python Generators - Generates validated Python data structures from schema definitions to keep code synchronized with data contracts.
  • Avro Model Generation - Creates type-safe data models from diverse schema specifications including JSON Schema, XML, and Avro.
  • Constraint-to-Code Mappers - Translates schema constraints like minimum, maximum, or pattern requirements into field validation definitions.
  • Schema Normalizers - Normalizes diverse schema formats like JSON Schema, OpenAPI, and Avro into a consistent internal model for translation.
  • Schema-to-Code CLI Generators - Provides a command-line interface to parse data formats and generate type-hinted Python code.
  • API Client Generators - Generates type-safe client models from API specifications to ensure consistent data handling.
  • Data Model Engineering - Transforms complex data formats into native Python data structures for robust application development.
  • Data Model Generators - Transforms various API specifications into type-safe Pydantic models, dataclasses, and TypedDicts.
  • API Schema Retrieval - Retrieves schema definitions from network URLs with support for custom headers and timeouts.
  • Generated Field Exclusions - Adjusts field generation settings like optionality and default value stripping to meet specific data requirements.
  • Literal Types - Converts enumeration fields into literal type annotations to simplify generated model structures.
  • Dynamic Data Model Generation - Executes generated model code in temporary modules to provide live, usable classes at runtime.
  • Identifier-Based Model References - Resolves internal and external schema references to prevent redundant class generation and promote code reuse.
  • Schema Patching and Merging - Identifies and merges identical model or enum definitions across a schema to reduce redundancy and simplify the generated codebase.
  • Type Mapping Overrides - Allows overriding default type generation to map schema formats to custom types.
  • Strict Type Enforcement - Enforces strict type conversion rules during model generation to ensure data integrity.
  • Field-Level Metadata Annotations - Uses annotated syntax for field definitions to preserve schema constraints and metadata in generated code.
  • Automatizări de flux de lucru declanșate de build - Triggers automatic data model updates or verification whenever underlying schema files change.
  • Custom Declarative Base Classes - Supports custom base class definitions and mixins to inject shared functionality into generated data models.
  • Generated Code Organizers - Organizes generated models into modular file structures to maintain clean and manageable project codebases.
  • Field Name Aliasing - Maps schema field and class names to safe Python identifiers using custom aliasing configurations.
  • Project Configuration - Defines generation settings within project configuration files to ensure repeatable model creation.
  • Template-Based Code Generators - Automates the creation of source code using dynamic templates and configurable rendering logic.
  • Schema-Driven Inheritance Generators - Translates schema composition rules into explicit class inheritance hierarchies in generated Python models.
  • Iterable Class Implementation - Implements sequence interfaces on root list-wrapping classes to allow direct indexing and iteration.
  • Schema Reference Resolution - Fetches external schema definitions over network or filesystem with configurable resolution settings.
  • Configuration-Driven Pipelines - Ensures reproducible generation workflows by defining parameters and execution sequences in static configuration files.
  • Pydantic Schema Validation - Automates the creation of validated Pydantic data structures from schema definitions.
  • Schema Default Values - Allows overriding schema-defined default values with custom mappings during the code generation process.
  • Circular Dependency Resolution - Orders class definitions and resolves circular imports through forward references and modular splitting.
  • Immutable Model Generation - Generates frozen, immutable models to enforce data integrity and prevent accidental modification.
  • CI/CD Integrations - Automates data model generation and validation within continuous integration pipelines to ensure schema synchronization.
  • Model Field Constraints - Configures model strictness to allow, ignore, or forbid extra fields not defined in the source schema.
  • Model Naming Overrides - Overrides auto-generated class names using custom mappings to avoid collisions and improve readability.
  • Package and Variable Name Collision Avoidances - Resolves naming conflicts between fields and types to maintain clarity in generated code.
  • Parameter Name Normalization - Normalizes non-safe property names to snake case to ensure generated code follows standard naming conventions.
  • Generated Container Types - Implements abstract container types in generated models to enhance type hinting flexibility and usability.
  • Source Change Monitors - Monitors input schema files for modifications to trigger automatic code regeneration.
  • Data Model Validation - Verifies that existing data models match current schema definitions to ensure consistency.
  • Path Filters - Restricts model generation to a subset of API paths while maintaining necessary parameter and versioning context for the selected endpoints.
  • OpenAPI to Python Converters - Maps OpenAPI schema definitions to native Python classes for type-safe API consumption.

Istoric stele

Graficul istoricului de stele pentru koxudaxi/datamodel-code-generatorGraficul istoricului de stele pentru koxudaxi/datamodel-code-generator

Căutare AI

Explorează mai multe repository-uri excelente

Descrie ce ai nevoie în limbaj simplu — AI-ul sortează mii de proiecte open source selectate în funcție de relevanță.

Start searching with AI

Întrebări frecvente

Ce face koxudaxi/datamodel-code-generator?

This project is a command-line schema-to-code converter designed to transform diverse data specifications into type-safe Python data structures. It functions as a generator for Pydantic models, dataclasses, and typed dictionaries, enabling developers to maintain synchronization between evolving data contracts and application code. By parsing formats such as JSON Schema, OpenAPI, AsyncAPI, Protobuf, and Avro, the tool automates the creation of native classes that reflect the…

Care sunt principalele funcționalități ale koxudaxi/datamodel-code-generator?

Principalele funcționalități ale koxudaxi/datamodel-code-generator sunt: Schema-Driven Code Generators, JSON Schema to Python Generators, Avro Model Generation, Constraint-to-Code Mappers, Schema Normalizers, Schema-to-Code CLI Generators, API Client Generators, Data Model Engineering.

Care sunt câteva alternative open-source pentru koxudaxi/datamodel-code-generator?

Alternativele open-source pentru koxudaxi/datamodel-code-generator includ: knq/xo — xo is a tool for generating type-safe Go models and query execution code from SQL database schemas and queries. It… joelittlejohn/jsonschema2pojo — Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc. orval-labs/orval — Orval is an OpenAPI-to-TypeScript code generator that produces fully typed API clients, data-fetching hooks, mock… hey-api/openapi-ts — openapi-ts is a tool and orchestrator used to convert OpenAPI specifications into type-safe TypeScript SDKs and HTTP… oapi-codegen/oapi-codegen — oapi-codegen is an OpenAPI specification compiler and code generator for Go. It transforms OpenAPI definitions into… ricosuter/nswag — NSwag is an OpenAPI toolchain for .NET that provides a suite of generators for converting OpenAPI specifications and…

Alternative open-source pentru Datamodel Code Generator

Proiecte open-source similare, clasificate după numărul de funcționalități comune cu Datamodel Code Generator.
  • knq/xoAvatar knq

    knq/xo

    3,890Vezi pe GitHub↗

    xo is a tool for generating type-safe Go models and query execution code from SQL database schemas and queries. It functions as a multi-dialect SQL tool supporting PostgreSQL, MySQL, SQLite, Oracle, and Microsoft SQL Server to produce idiomatic source code. The project uses a template-based generation system, allowing the structure and logic of the generated database source code to be defined through customizable text templates. It also includes a database schema visualizer that analyzes table relationships and definitions to create visual diagrams and structured documentation. The tool's ca

    Go
    Vezi pe GitHub↗3,890
  • joelittlejohn/jsonschema2pojoAvatar joelittlejohn

    joelittlejohn/jsonschema2pojo

    6,379Vezi pe GitHub↗

    Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc

    Java
    Vezi pe GitHub↗6,379
  • hey-api/openapi-tsAvatar hey-api

    hey-api/openapi-ts

    4,128Vezi pe GitHub↗

    openapi-ts is a tool and orchestrator used to convert OpenAPI specifications into type-safe TypeScript SDKs and HTTP client implementations. It automatically generates typed interfaces and request functions from API definitions to ensure consistency between the server and the client. The project employs a transport-agnostic client interface, decoupling high-level API calls from the underlying network library. It uses a plugin-based generation pipeline and a custom plugin architecture to allow for the customization of output types and validation schemas. The system provides capabilities for n

    TypeScriptangularaxioscodegen
    Vezi pe GitHub↗4,128
  • oapi-codegen/oapi-codegenAvatar oapi-codegen

    oapi-codegen/oapi-codegen

    8,088Vezi pe GitHub↗

    oapi-codegen is an OpenAPI specification compiler and code generator for Go. It transforms OpenAPI definitions into type-safe Go client libraries, server boilerplate, and data models to facilitate contract-first API development. The tool distinguishes itself through a flexible customization system that allows users to override generated types and imports via specification extensions. It supports the use of custom text templates to redefine the final source code structure and provides a specification overlay mechanism to modify or remove endpoints without altering the original source file. Th

    Gogogolangopenapi
    Vezi pe GitHub↗8,088
Vezi toate cele 30 alternative pentru Datamodel Code Generator→

Colecții curatoriate care includ Datamodel Code Generator

Colecții selectate manual în care apare Datamodel Code Generator.
  • Content scaffolding tools
  • Generatoare de cod client pentru OpenAPI