NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #3094 most downloaded on PyPI
Smart object creation facility for Django.
Last release 12 days ago
22 Sep 2026
Release timing varies
gaps range from 2 weeks to 7 months
Nearly every release is documented
notes for 54 of 54 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
55 releases · first in 2019
Add Django 6.1 support, including compatible generic foreign key handling
OneToOneField relations not being persisted to the database when passed as kwargs to baker.make(), including iterators and bulk creation (#473)_full_clean=True, and roll back the parent and related writes if validation or saving fails (#592)URLField and EmailField generators respect max_length when the configured limit is at least 17 and 13 characters, respectively; smaller limits still produce values that exceed max_lengthauto_now/auto_now_add values being written to the wrong database when _using is set, and route the follow-up UPDATE through _base_manager so it also works on models without an objects manager or with a filtered default managerBaker.instance() into a pure, database-free Baker._classify_attrs() helper, with direct unit tests asserting it runs zero queries💙 Thank you to our sponsors for supporting Model Bakery’s maintenance.
If Model Bakery saves you time, consider supporting it through GitHub Sponsors or Ko-fi. Your support helps fund bug fixes, reviews, and compatibility with new Django and Python versions.
Using Model Bakery at work? Tidelift offers an enterprise subscription that helps organizations manage the security, licensing, and maintenance of their open source dependencies while supporting maintainers.
One column per quarter.
Add _full_clean flag to baker.make() and baker.prepare() to run Django model validation ( False by default), including the baker.make(..., _bulk_creat
_full_clean flag to baker.make() and baker.prepare() to run Django model validation (False by default), including the baker.make(..., _bulk_create=True) path (#523)related() with reverse M2M relations raising AttributeError (#601)tox-uv, dependency groups, reusable coverage/docs tox environments, and docs validation in CIbaker.make(..., _bulk_create=True, _full_clean=True), the operation is wrapped in a transaction to ensure atomic rollback if validation fails_using database consistently for generated related objects in baker.make(..., _bulk_create=True)baker.make(..., _bulk_create=True) when related objects mix saved and unsaved instances_full_clean flag to baker.make(), prepare(), and bulk_create() by @benaduo in #591related with reverse M2M relation by @SvenMoenig in #613Full Changelog: 1.23.5...1.24.0
Speed up Baker.get_fields() by returning _meta.fields + _meta.many_to_many directly instead of filtering _meta.get_fields() .
Baker.get_fields() by returning _meta.fields + _meta.many_to_many directly instead of filtering _meta.get_fields().Baker.get_fields() by @anze3db in #593Full Changelog: 1.23.4...1.23.5
Fix AttributeError when processing models with reverse ForeignKey relations ( ManyToOneRel )
ManyToOneRel) (#575)_bulk_create not setting M2M fields on FK-related objects (#583)Full Changelog: 1.23.3...1.23.4
[dev] Replace mypy with ty as the primary type checker with stricter type checks
AutoField values via iterators with _quantity and avoid hangs (#577)AutoField via iterators (#577) by @amureki in #578Full Changelog: 1.23.2...1.23.3
Fix _bulk_create=True to use bulk_create even without _quantity
_bulk_create=True to use bulk_create even without _quantity (#462)Full Changelog: 1.23.1...1.23.2
Fix _bulk_create for ManyToManyField using custom through models
_bulk_create for ManyToManyField using custom through models (#477)Full Changelog: 1.23.0...1.23.1
Fix related() with FK relations creating duplicate parent entities
related() with FK relations creating duplicate parent entities (#397)USE_CONTENTTYPES=False not actually disabling contenttypes in testsFull Changelog: 1.22.1...1.23.0
[dev] PyPI releases now use trusted publishing
Full Changelog: 1.22.0...1.22.1
Ref #61 -- Introduce generators for each integer field by @amureki in #528
baker.prepare() with GenericForeignKey to work without database access by @amureki in #501Full Changelog: 1.21.0...1.22.0
AutoField, BigAutoField, and SmallAutoField (#61)gen_integer() in favor of field-specific generators that respect Django's field ranges (#61)prepare() with GenericForeignKey no longer accesses the database; content_object attribute is unavailable in this modeseq()'s increment_by argumentseq() import in basic usageDrop fallbacks made for Django < 4.2
for_concrete_model configurationgen_float() to use uniform() with configurable min_float/max_float bounds instead of random() * gen_integer() which produced skewed distributiongen_interval() to use min_interval/max_interval instead of offset parameter which never worked as intended due to huge MAX_INT rangegen_date_range() and gen_datetime_range() to prevent empty ranges by enforcing a minimum interval of 1 daybaker_random.randint() directly in gen_pg_numbers_range() instead of gen_integer()gen_from_choices generator now ignores None or "" values in choices when the field doesn't allow null or blank valuesruff check . when make lint by @mattwang44 in #527gen_integer usage by @amureki in #557Full Changelog: 1.20.5...1.21.0
Add Django 5.2 support by @scpaes in https://github.com/model-bakers/model_bakery/pull/526
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.20.4...1.20.5
fix: should not skip auto now fields but assign with specified value by @mattwang44 in https://github.com/model-bakers/model_bakery/pull/520
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.20.3...1.20.4
auto_now and auto_now_add fields with seq or callable.fix: auto now fields should be skipped by @mattwang44 in https://github.com/model-bakers/model_bakery/pull/507
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.20.2...1.20.3
auto_now and auto_now_add fields in combination with _fill_optionalfix and test regression in 1.18.3 forbidding setting GFK by a function by @PetrDlouhy in https://github.com/model-bakers/model_bakery/pull/515
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.20.1...1.20.2
Remove deprecation warning of datetime.datetime.utcfromtimestamp. by @jairhenrique in https://github.com/model-bakers/model_bakery/pull/510
_refresh_after_create option by @amureki in https://github.com/model-bakers/model_bakery/pull/514Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.20.0...1.20.1
_refresh_after_create optionRecipe.prepare without _quantity (on one-to-one relation)datetime.datetime.utcfromtimestamp.Adds support to Python 3.13 by @jairhenrique in https://github.com/model-bakers/model_bakery/pull/504
db_default is being considered by @berinhard in https://github.com/model-bakers/model_bakery/pull/502Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.19.5...1.20.0
Fix #498 -- Reset GFK fields when content object is None by @amureki in https://github.com/model-bakers/model_bakery/pull/499
None by @amureki in https://github.com/model-bakers/model_bakery/pull/499Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.19.4...1.19.5
content_type and object_id fields when the content object is NoneDeprecate model_bakery.random_gen.gen_text in favor of model_bakery.random_gen.gen_string by @SergeiJp in https://github.com/model-bakers/model_bakery…
None value for generic foreign keys within iterators by @jeremy-engel in https://github.com/model-bakers/model_bakery/pull/497TextField generator respect max_length by @SergeiJp in https://github.com/model-bakers/model_bakery/pull/493model_bakery.random_gen.gen_text in favor of model_bakery.random_gen.gen_string by @SergeiJp in https://github.com/model-bakers/model_bakery/pull/493Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.19.3...1.19.4
None value for generic foreign keys within iteratorsTextField generator respect max_lengthmodel_bakery.random_gen.gen_text in favor of model_bakery.random_gen.gen_stringDo not handle GFK fields when the object is None by @amureki in https://github.com/model-bakers/model_bakery/pull/496
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.19.2...1.19.3
Fix #488 -- Align GFK and content type fields by @amureki in https://github.com/model-bakers/model_bakery/pull/494
prepare() to be used with GFK by @amureki in https://github.com/model-bakers/model_bakery/pull/495Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.19.1...1.19.2
prepare() to be used with GFKFix #385 -- Handle bulk creation when using reverse related name by @magdumsuraj07 in https://github.com/model-bakers/model_bakery/pull/486
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.19.0...1.19.1
Fix #483 -- Add Django 5.1 support by @amureki in https://github.com/model-bakers/model_bakery/pull/485
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.18.3...1.19.0
Refs #416 -- Allow combination of GFK and _fill_optional by @amureki in https://github.com/model-bakers/model_bakery/pull/438
_fill_optional by @amureki in https://github.com/model-bakers/model_bakery/pull/438Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.18.2...1.18.3
GenericForeignKey fields in combination with _fill_optionalFix make_recipe to work with _quantity #28 by @lucasrcezimbra in https://github.com/model-bakers/model_bakery/pull/480
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.18.1...1.18.2
Replace expensive count() with cheap exists() by @tuky in https://github.com/model-bakers/model_bakery/pull/478
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.18.0...1.18.1
Allow baking without contenttypes framework
contenttypes frameworkRUF100 to ruff by @amureki in https://github.com/model-bakers/model_bakery/pull/459SIM rules by @amureki in https://github.com/model-bakers/model_bakery/pull/460Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.17.0...1.18.0
Add support to auto_now and auto_now_add fields.
auto_now and auto_now_add fields.random_gen.gen_slug and random_gen.gen_stringFull Changelog: https://github.com/model-bakers/model_bakery/compare/1.16.0...1.17.0
auto_now and auto_now_add fields.random_gen.gen_slug and random_gen.gen_stringImproved performance of Baker.get_fields()
Baker.get_fields()pre-commit configFull Changelog: https://github.com/model-bakers/model_bakery/compare/1.15.0...1.16.0
Fix #439 -- revert erroneous optimisation of related logic by @amureki in https://github.com/model-bakers/model_bakery/pull/441
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.14.0...1.15.0
ruff by @amureki in https://github.com/model-bakers/model_bakery/pull/433
recipe.py by @amureki in https://github.com/model-bakers/model_bakery/pull/434baker.py by @amureki in https://github.com/model-bakers/model_bakery/pull/435baker.py::is_iterator by @amureki in https://github.com/model-bakers/model_bakery/pull/436_create_files flag in relational generators by @hiaselhans in https://github.com/model-bakers/model_bakery/pull/379Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.13.0...1.14.0
recipe.py::_mappingbaker.py::bulk_createpycodestyle, pydocstyle, flake8 and isort with ruffbaker.py::is_iterator:sparkles: Adds global seeding to baker by @nefrob in https://github.com/model-bakers/model_bakery/pull/426
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.12.0...1.13.0
fix: seq function with start=0 by @vvvin333 in https://github.com/model-bakers/model_bakery/pull/417
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.11.0...1.12.0
Fixes for Django 4.2 by @knyghty in https://github.com/model-bakers/model_bakery/pull/406
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.10.3...1.11.0
Enforce Python 3.7 as a minimum version in project metadata
FloatRangeField as it was removed in Django 3.1Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.10.2...1.10.3
[dev] Fix GitHub Action for publishing to PyPI
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.10.0...1.10.1
[#322] Fix seq for timezone-aware start value by @timjklein36 in https://github.com/model-bakers/model_bakery/pull/353
seq for timezone-aware start value by @timjklein36 in https://github.com/model-bakers/model_bakery/pull/353_bulk_create=True by @amureki in https://github.com/model-bakers/model_bakery/pull/354Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.8.0...1.9.0
Fix #349 -- subtract lists in Baker.get_fields() instead of casting to set by @amureki in https://github.com/model-bakers/model_bakery/pull/352
Baker.get_fields() instead of casting to set by @amureki in https://github.com/model-bakers/model_bakery/pull/352Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.7.1...1.8.0
Baker.get_fields() to subtract lists instead of extra set cast PR #352fix future deprecate warning of django.utils.timezone.utc by @jairhenrique in https://github.com/model-bakers/model_bakery/pull/339
django.utils.timezone.utc by @jairhenrique in https://github.com/model-bakers/model_bakery/pull/339Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.7.0...1.7.1
Fixed a bug with overwritten _save_kwargs and other custom arguments PR #330
_save_kwargs and other custom arguments PR #330Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.6.0...1.7.0
Added documentation for callables, iterables, sequences PR #309
Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.5.0...1.6.0
Add py.typed export per PEP 561 PR #158
model_bakery.recipe module, make Recipe class generic PR #292Conditionally support NullBooleanField, it's under deprecation and will be removed in Django 4.0 PR #250
increment_by parameter of seq helper when value is an instance of datetime PR #247bulk_create disclaimer in docs PR #245_id fields to use sequences PR #253_quantity usage PR #261Full Changelog: https://github.com/model-bakers/model_bakery/compare/1.3.3...1.4.0
_bulk_create flag is not populating related objects as well PR #206
Fixed a bug (introduced in 1.2.1) that was breaking imports of recipes from non-installed-app modules PR #201
[dev] Add explanations to imports in generators.py to match with current supported Django versions PR #179
[dev] Run CI against main Django branch to cover possible upcoming changes/deprecations PR #159
_bulk_create parameter to make for using Django manager bulk_create with _quantity PR #134app_name.ModelName convention in import_from_str PR #140app_name.recipe_name PR #140one_to_one parameter to foreign_key to allow usage of _quantity for recipes based on models with OneToOne fields PR #169utils.seq PR #143main Django branch to cover possible upcoming changes/deprecations PR #159setup.py to not import the whole module for package data, but get it from __about__.py PR #142model_bakery.timezone.now fallback (use django.utils.timezone.now instead) PR #141model_bakery.timezone.smart_datetime function (directly use model_bakery.timezone.tz_aware instead) PR #147Add ability to pass str values to foreign_key for recipes from other modules PR #120
str values to foreign_key for recipes from other modules PR #120_using to support multi database Django applications PR #126postgres and postgis tests. PR #118Support to django 3.1 JSONField PR #85 and PR #106
JSONField PR #85 and PR #106prefix in seq values (PR #111 fixes Issue #93)Support to Postgres fields: DecimalRangeField, FloatRangeField, IntegerRangeField, BigIntegerRangeField, DateRangeField, DateTimeRangeField PR #80
Django 3.0 and Python 3.8 to CI PR #48
start argument in baker.seq PR #56settings.py PR #58Improvements on the migrations script
Python script to help developers on migrating from Model Mommy to Model Bakery
Rename model_mommy code to model_bakery
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →