NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #976 most downloaded on PyPI
Datamodel Code Generator
Last release 10 days ago
24 Sep 2026
Ships on a steady schedule
a new release about every 9 days
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
287 releases · first in 2019
Update documentation by @noddycode in https://github.com/koxudaxi/datamodel-code-generator/pull/1316
openapi-spec-validator to 0.5.2 by @Fokko in https://github.com/koxudaxi/datamodel-code-generator/pull/1343Due to differences in file loading order between operating systems, we've added a sorting process when fetching file listings within directories in order to eliminate discrepancies in model and field names. As a result, model names that differ from those generated by existing earlier versions may be produced.
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.19.0...0.20.0
One column per quarter.
Import Annotated from typing_extensions for Python <= 3.8 by @airwoodix in https://github.com/koxudaxi/datamodel-code-generator/pull/1274
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.18.1...0.19.0
default_factory field should be non-optional by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1254
py.typed to mark project as typed by @KotlinIsland in https://github.com/koxudaxi/datamodel-code-generator/pull/1259Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.18.0...0.18.1
Update __all__ to expose needed types by @ShaneMurphy2 in https://github.com/koxudaxi/datamodel-code-generator/pull/1230
--input-file-type is auto. by @KotlinIsland in https://github.com/koxudaxi/datamodel-code-generator/pull/1248--input-file-type is auto by @KotlinIsland in https://github.com/koxudaxi/datamodel-code-generator/pull/1249Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.17.2...0.18.0
Remove union operator error when target-python is 3.9 or early version by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1094
docuemnt -> document by @kamyar in https://github.com/koxudaxi/datamodel-code-generator/pull/1179Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.17.1...0.17.2
Change custom template dir structure by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1070
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.17.0...0.17.1
Add --keep-model-order by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1043
--keep-model-order by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1043discriminator by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1045patternProperties by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1046default_factory by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1047--field-extra-keys-without-x-prefix by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/1066Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.16.1...0.17.0
Change default value to None by @JensHeinrich in https://github.com/koxudaxi/datamodel-code-generator/pull/1028
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.16.0...0.16.1
Fix the order of the model having multiple base_class by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/995
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.15.0...0.16.0
The release has some improvements in model generation. The generated model names or the structure will be changed.
The release has some improvements in model generation. The generated model names or the structure will be changed.
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.14.1...0.15.0
Fix deprecation warnings around "copy_on_model_validation" by @Dominic-Walther in https://github.com/koxudaxi/datamodel-code-generator/pull/927
--allow-extra-fields by @fgebhart in https://github.com/koxudaxi/datamodel-code-generator/pull/949Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.14.0...0.14.1
Drop python3.6 support by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/887
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.13.5...0.14.0
Fix mro field on enum by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/891
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.13.4...0.13.5
Fix alias modular default enum member by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/888
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.13.3...0.13.4
Fix modular default enum member by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/876
| by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/884Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.13.2...0.13.3
Use default of $ref on enum by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/832
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.13.1...0.13.2
Added IPv4/IPv6Network support. by @ngaranko in https://github.com/koxudaxi/datamodel-code-generator/pull/789
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.13.0...0.13.1
Fix --snake-case-field breaks class_name by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/777
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.12.3...0.13.0
Support --original-field-name-delimiter option by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/776
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.12.2...0.12.3
Support subclass enum by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/771
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.12.1...0.12.2
[FIX] inheritance update refs by @jdkent in https://github.com/koxudaxi/datamodel-code-generator/pull/767
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.12.0...0.12.1
Fix field constraint value by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/745
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.11.20...0.12.0
no use constr when field-constraints by @linshoK in https://github.com/koxudaxi/datamodel-code-generator/pull/726
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.11.19...0.11.20
fix booleans literals being converted to int by @koonpeng in https://github.com/koxudaxi/datamodel-code-generator/pull/704
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.11.18...0.11.19
[Docs] Fix typo by @ijrsvt in https://github.com/koxudaxi/datamodel-code-generator/pull/702
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.11.17...0.11.18
do not convert literal int to string for pydantic 1.9.0 or later by @duesenfranz in https://github.com/koxudaxi/datamodel-code-generator/pull/689
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.11.16...0.11.17
Fix json type form http by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/637
Non{Positive,Negative}{Float,Int} in models by @duesenfranz in https://github.com/koxudaxi/datamodel-code-generator/pull/679Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.11.15...0.11.16
Fix typed-ast by @koxudaxi in https://github.com/koxudaxi/datamodel-code-generator/pull/626
Full Changelog: https://github.com/koxudaxi/datamodel-code-generator/compare/0.11.14...0.11.15
- Fix a bug for # field [#558]
- Support pydantic 1.5.1 [#537]
ignore broken regex version [#519]
- Fix version option [#499] ---
Fix invalid generated code with openapi validator [#496]
Support false on additionalProperties [#472] by @reb00ter
Thanks to @reb00ter
set default base class when removed all base class [#448 ]
Fix inline enum only string literal [#445] by @goodoldneon
Thanks to @goodoldneon
- Support customTypePath [#436]
Don't generate enum models that have been swapped by a reused model [#430] by @shnups
Thanks to @shnups
Handle nested nullable enums [#425] by @philipbjorge
Thanks to @philipbjorge
Fix #420 [#421] by @goodoldneon (IPv4Address doesn't import from pydantic.validators [#420])
Thanks to @goodoldneon
Support field extras keys [#416]
Fix get_relative_path subfolders with same names [#415] by @siame
Thanks to @siame
breaking change The detail is in #413
breaking change The detail is in #413
Support complex oneOf and anyOf [#410]
oneOf and anyOf [#410]Improve resolving relative path [#406]
Improve imports in DataType [#403]
Support time and idn-email format #397
The detail is in #398
Refactor data_type_manager [#384]
Thanks to @yuyupopo
Improve resolving module names [#377]
Fix x-enum-varnames for string [#372]
Escape special characters in regex [#370]
breaking change The detail is in https://github.com/koxudaxi/datamodel-code-generator/issues/357
breaking change The detail is in https://github.com/koxudaxi/datamodel-code-generator/issues/357
Support nested json_pointer [#352]
Generate function supports relative input path [#351]
Fix parsing ref on root model [#346]
Ignore duplicate object of allOf [#343]
The detail is in #344
Support enable_faux_immutability [#338]
- Improve strict-nullable [#330]
Support strict-nullable option [#328]
Improve resolving referenced models [#324]
Change internal interface [https://github.com/koxudaxi/datamodel-code-generator/issues/325]
Your coding agent can read these notes before it upgrades. Set up the MCP server →