CheckOps
Model Bakery
Model Bakery is an Apache-2.0 library that creates Django model instances for tests with one line, filling required fields automatically, including related objects.
Latest public signals
Not refreshed yet. Refresh reads the public site and, when the entry has a GitHub repository, the latest release.
Introduction
Model Bakery offers a smart way to create fixtures for testing in Django. With a simple API you can create many objects with a single line of code, according to its README.
baker.make(Customer) creates and saves an instance with required fields filled, including foreign keys; baker.prepare() builds without saving; _quantity makes several objects; and Recipes define reusable templates with fixed values, sequences and related recipes. It follows Python and Django support cycles, dropping versions at end-of-life.
Release 1.24.2 shipped in October 2026.
In the quality loop it supports Django unit and integration tests.
The source code is at model-bakers/model_bakery on GitHub under the Apache-2.0 licence, with about 1,000 stars; the most recent commit was on 8 November 2026.
Features
- One-line fixtures: baker.make().
- Related objects: Foreign keys filled automatically.
- Recipes: Reusable templates.
- prepare(): Unsaved instances.
- Quantities: Many objects at once.
Pros
- Very low setup: Ideal for Django projects.
- Free to use: Open source under the Apache-2.0 licence, so the core tool costs nothing to use.
- Actively maintained: The repository had commits as recent as 8 November 2026.
Cons
- Django only: Not for other frameworks.
Usage and Links (Example)
from model_bakery import baker
customer = baker.make("shop.Customer", name="Ada")
orders = baker.make("shop.Order", customer=customer, _quantity=3)
Resources:
Pricing
Model Bakery is free and open source under the Apache-2.0 licence.
Recommended for?
- Django developers.
- Not a fit outside Django.
Conclusion
Model Bakery is a simple, maintained fixture tool for Django tests.
On CheckOps, Model Bakery is filed under the Unit testing and Integration testing stages. Related tools listed here include factory_boy, Polyfactory, Faker (Python), Mimesis, pytest and Hypothesis. Before choosing, compare them on licence, supported languages and platforms, hosting model, and how well each fits your existing CI pipeline. Facts on this page were checked against the official website, documentation and repository on 11 November 2026; statements the vendor makes about its own product are marked as vendor claims.
Alternatives
Other tools on CheckOps that cover similar ground. Open a page, or compare one with Model Bakery side by side.
Ffactory_boyfactory_boy is an MIT-licensed test fixtures replacement for Python, inspired by thoughtbot's factory_bot, that builds test objects and ORM records for Django, SQLAlchemy and MongoEngine with Faker integration.Compare with Model Bakery
PPolyfactoryPolyfactory is an MIT-licensed Python library from the Litestar organisation that builds mock data factories from type hints for dataclasses, Pydantic, attrs, TypedDict, msgspec and ORM models.Compare with Model Bakery
FFaker (Python)Faker is an MIT-licensed Python package that generates fake but realistic data such as names, addresses, text, dates and identifiers, with dozens of locales, a pytest fixture and seeding for reproducible test data.Compare with Model Bakery
MMimesisMimesis is an MIT-licensed Python library for generating fake but realistic data in 47 locales, with schema-based generation for JSON, XML and fixtures and a focus on speed.Compare with Model Bakery- Ppytestpytest is the usual Python test runner: plain asserts, fixtures, parametrization, and a large plugin set.Compare with Model Bakery
HHypothesisHypothesis is the MPL-2.0 property-based testing library for Python: describe the range of inputs, let it generate cases including edge cases, and get the simplest failing example when a property breaks.Compare with Model Bakery