model-mommy
Smart object creation facility for Django.
What it is and what it does
Model Mommy is a Django testing utility that automatically generates model instances populated with random data, eliminating the need to manually specify every field when creating test fixtures. It introspects Django models and fills in required fields intelligently, making it faster to write test setup code.
However, the package has been abandoned since October 2019 and is no longer maintained. The creators explicitly recommend migrating to Model Bakery, a renamed successor that continues development. While Model Mommy remains functional for legacy projects, new projects should use Model Bakery instead to ensure ongoing support and compatibility with current Django versions.
Use it for:
- Quickly populate test databases with realistic Django model instances without writing repetitive fixture code.
- Generate related model objects automatically during unit tests to reduce boilerplate in test setup methods.
- Create temporary test data with random values to verify model behavior across different field combinations.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Model Mommy generates Django model instances with random data for testing, automating the creation of test fixtures without manual field specification.
No. Model Mommy is abandoned and explicitly recommends migration to Model Bakery. While it may still work in legacy projects, new projects should use Model Bakery instead. Existing projects should plan migration to maintain compatibility with future Django versions and receive security updates.
Install
model-mommy on PyPI
pip
pip install model-mommyuv
uv add model-mommypoetry
poetry add model-mommyInstalling model-mommy
Before you install
Installation is straightforward with low friction, but the package is abandoned as of 2019-10-21 and explicitly recommends migration to Model Bakery. No active maintenance or security updates are available.
License in practice
Licensed under Apache 2.0 (permissive), allowing commercial and private use with minimal restrictions, though the abandoned status means no legal updates or clarifications will be issued.
Quickstart
pip install model-mommy
from model_mommy import mommy
user = mommy.make('myapp.User')
Requires Django to be installed; package is no longer maintained and its creators recommend migrating to Model Bakery instead.
Verify before relying
- Whether existing projects using model-mommy encounter compatibility issues with modern Django versions beyond 2.x
- Whether the single runtime dependency (django) has specific version constraints that the fact sheet does not specify
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — django |
| Maintenance | abandoned — 2,489 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 339,390/month — #7,426 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: model_mommy-2.0.0-py2.py3-none-any.whl
Keywords: django, testing, factory, python
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
model-bakeryModel Bakery creates test fixtures for Django…
permissive · top 5,000 on PyPI
factory-boyfactory_boy replaces static test fixtures with…
permissive · top 1,000 on PyPI
pytest-factoryboyIntegrates factory_boy with pytest to register…
permissive · top 5,000 on PyPI
mixerMixer generates test data and model instances…
permissive · top 15,000 on PyPI
async-factory-boyExtends factory_boy to generate test fixtures…
permissive · top 15,000 on PyPI
wagtail-factoriesProvides factory-boy classes for generating…
permissive · top 15,000 on PyPI
pytest-docker-toolsProvides pytest fixture factories for…
permissive · top 5,000 on PyPI
pytest-fakerProvides pytest fixtures that integrate the…
permissive · top 15,000 on PyPI
pytest-rngProvides pytest fixtures that make random…
permissive · top 15,000 on PyPI
namesGenerates random human names (first, last, or…
permissive · top 15,000 on PyPI