Model Mommy: A Legacy Python Fixture Factory, Migrate to Model Bakery
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
Model Mommy was a popular Python library designed to simplify the creation of smart test fixtures and realistic test data. This project is no longer actively maintained, and its users are strongly advised to migrate to its successor, Model Bakery. The renaming to Model Bakery was a conscious decision to avoid reinforcing gender stereotypes within the technology community.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Model Mommy was a widely used Python library that provided a smart and efficient way to generate test fixtures for applications, particularly within the Django ecosystem. It aimed to simplify the process of creating realistic test data, making unit and integration testing more streamlined and less prone to boilerplate code.
Important Note: Model Mommy is no longer maintained. Its development has ceased, and the project has been succeeded by Model Bakery. Users of Model Mommy are strongly encouraged to migrate their projects to Model Bakery for continued support, new features, and bug fixes. The decision to rename the project to Model Bakery was made to address and avoid reinforcing gender stereotypes for women in technology, a move detailed in the project's original README.
Installation
Given that Model Mommy is deprecated, installing it for new projects is not recommended. For existing projects that still rely on it, you might have it installed. If you need to install it for legacy reasons, you can use pip:
pip install model_mommy
However, the recommended action is to migrate to Model Bakery. You can install Model Bakery using pip:
pip install model_bakery
Please refer to the Model Bakery documentation for detailed migration guides and usage instructions.
Examples
Model Mommy's core functionality revolved around intelligently creating instances of your Django models, populating their fields with sensible default data or allowing for custom overrides. For instance, it could generate a User object with a valid username and email without you having to manually specify each field.
While specific code examples for Model Mommy are now less relevant due to its deprecation, its successor, Model Bakery, offers the same powerful capabilities. Model Bakery allows you to create model instances with ease, making your tests cleaner and more robust. For example, creating a model instance might look like this with Model Bakery:
from model_bakery.bakery import make
from myapp.models import MyModel
# Create a MyModel instance with default values
instance = make(MyModel)
# Create a MyModel instance with specific field values
instance_with_data = make(MyModel, name="Test Name", value=123)
This approach significantly reduces the effort required to set up test environments.
Why Use (or Why Migrate)
Model Mommy played a significant role in the Python testing landscape by providing a robust solution for fixture generation. Its intelligent defaults and ease of use helped many developers write better, more comprehensive tests.
The primary reason to migrate from Model Mommy to Model Bakery is the active maintenance and continued development of the latter. Model Bakery is the direct successor, benefiting from ongoing community contributions, bug fixes, and compatibility updates with newer versions of Python and Django. Furthermore, the renaming reflects a commitment to fostering a more inclusive environment in tech. By migrating, you ensure your project uses a supported library and aligns with modern best practices.
Links
- Model Mommy GitHub Repository: https://github.com/berinhard/model_mommy
- Model Bakery PyPI: https://pypi.org/project/model-bakery/
- Model Bakery Migration Guide: https://model-bakery.readthedocs.io/en/latest/migrating_from_mommy.html
- Article on Gender Stereotypes in Tech: https://www.witi.com/articles/1017/How-Gender-Stereotypes-are-Still-Affecting-Women-in-Tech/
Related repositories
Similar repositories that may be relevant next.

Maskit: Local Privacy Gateway for LLMs and AI Tools
September 20, 2026
Maskit is a local privacy desensitization gateway engineered for large language models and AI tools. It automatically masks sensitive data in requests sent to AI services and then seamlessly restores it in streaming responses, ensuring private information remains local. This innovative solution supports various AI assistants like Cursor and Claude Code, along with any tool offering a configurable Base URL.

CyberVerse: Self-Hosted Real-Time Digital Human Agent Platform
September 18, 2026
CyberVerse is an open-source, self-hosted platform for building real-time digital human agents. It leverages WebRTC, persona memory, tools, and RAG to create voice-first AI agents, with optional digital-human video capabilities. This powerful framework allows developers to create highly interactive and lifelike AI companions.

ctx-gate: LLM Context Gateway for Efficient Token Usage
September 16, 2026
ctx-gate is an LLM-agnostic context optimization proxy that reduces token consumption in AI interactions. It intelligently prunes conversation history and tool outputs, ensuring critical facts are retained without altering your workflow. Compatible with Anthropic and OpenAI APIs, ctx-gate helps developers manage LLM costs and maintain prompt fidelity.
Ferret MCP: AI-Powered Knowledge Extraction for Any Codebase
September 14, 2026
Ferret MCP is an MCP server designed to extract comprehensive knowledge from any codebase, combining static analysis with AI-powered deep interpretation. It provides detailed insights into architecture, patterns, dependencies, and API surface, delivering a senior engineer's analysis in seconds. This tool integrates seamlessly with various MCP clients, offering both free static analysis and advanced AI-driven reports.
Source repository
Open the original repository on GitHub.
24 counted GitHub visits