model-bakery
Smart object creation facility for Django.
Decision gist · record as of 2026-08-14
Yes. Model Bakery is actively maintained, has no known vulnerabilities, carries a permissive license, and solves a real pain point in Django testing. The low install friction and single dependency make it a safe, practical addition to any Django project's test suite.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Django to be installed; requires Python 3.10 or later.
- Low install friction; pure Python wheel with only django as a runtime dependency.
- Actively maintained with a recent release and steady commit history.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
last release 2026-06-23 (52 days) · last repo commit 2026-08-09 · 1,002 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,076,886 downloads/mo, #3,311 on PyPI
Alternatives
Verify before relying
pip install model-bakery
from model_bakery import baker
# In a test
customer = baker.make('shop.Customer')
print(customer.name) # auto-generated value- Whether the package supports custom field generation strategies beyond the built-in defaults.
- Performance characteristics when creating large numbers of related objects.
What it is and what it does
Model Bakery is a Django testing utility that automatically generates model instances with realistic, randomized data. Instead of manually constructing test objects with all required fields, you call baker.make() with a model name or class and receive a fully populated, saved instance. It introspects your model's fields and generates appropriate values—integers for IntegerField, email addresses for EmailField, dates for DateField, and so on—eliminating boilerplate in test setup.
The package is designed for developers writing Django unit tests who need quick, realistic fixtures without writing verbose factory code. It follows Django and Python release cycles, supporting current versions of both. With a single runtime dependency (django) and low install friction, it integrates directly into your test suite.
Use it for
- Rapidly populate test databases with valid model instances during unit test setup.
- Generate test data for integration tests without manually specifying every field value.
- Create related object hierarchies in tests with minimal code.
- Prototype and validate Django model schemas during development.
- Reduce test boilerplate when testing model methods and business logic.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Model Bakery is actively maintained, has no known vulnerabilities, carries a permissive license, and solves a real pain point in Django testing. The low install friction and single dependency make it a safe, practical addition to any Django project's test suite.
Install
model-bakery on PyPI
Before you install
Low install friction; pure Python wheel with only django as a runtime dependency. Actively maintained with a recent release and steady commit history.
Requires Django to be installed; requires Python 3.10 or later.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
pip install model-bakery
from model_bakery import baker
# In a test
customer = baker.make('shop.Customer')
print(customer.name) # auto-generated value
Verify before relying
- Whether the package supports custom field generation strategies beyond the built-in defaults.
- Performance characteristics when creating large numbers of related objects.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagedjango |
| Maintenance | Actively maintained 52 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,076,886 / month, #3,311 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: DjangoFramework :: Django :: 5.2Framework :: Django :: 6.0Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development |
Evidence: model_bakery-1.24.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “django test fixtures”
- model-bakeryModel Bakery creates test fixtures for Django models automatically,…
- model-mommyModel Mommy generates Django model instances with random data for…
- django-fixture-magicProvides Django management commands to dump database objects with…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also model-mommy · django-ordered-model · django-test-plus · pytest-django · fontbakery · pytest-factoryboy · pytest-rabbitmq · pytest-cases · factory-boy · fixtures