Mixer: A Powerful Fixture Replacement for Python ORMs and ODMs
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Mixer is a versatile Python library designed to replace fixtures and generate test data efficiently. It supports various ORMs and ODMs, including Django, SQLAlchemy, Flask-SQLAlchemy, Mongoengine, and Marshmallow, making it an invaluable tool for testing and development workflows.
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
Mixer is a robust Python library that simplifies the generation of test data and acts as a powerful fixture replacement. It's designed to create instances of Django, SQLAlchemy, Flask-SQLAlchemy, Peewee, Pony, Mongoengine, and Marshmallow models, as well as custom Python objects. This tool is particularly useful for streamlining your testing process by providing fast and convenient test-data generation.
Installation
Installation is straightforward using pip:
pip install mixer
Note: From version 6.2, Mixer requires Python 3.7+. For Python 2 support, the latest version is mixer 6.1.3.
Examples
Mixer integrates seamlessly with various frameworks. Here are a few quick examples:
Django Workflow
from mixer.backend.django import mixer
from customapp.models import User, UserMessage
# Generate a random user
user = mixer.blend(User)
# Generate an UserMessage and an User. Set username for generated user to 'testname'.
message = mixer.blend(UserMessage, user__username='testname')
# Generate 5 SomeModel's instances and take company field's values from custom generator
some_models = mixer.cycle(5).blend('somemodel', company=(name for name in company_names))
Flask, Flask-SQLAlchemy Workflow
from mixer.backend.flask import mixer
from models import User, UserMessage
mixer.init_app(self.app)
# Generate a random user
user = mixer.blend(User)
# Generate an userMessage
message = mixer.blend(UserMessage, user=user)
Why Use Mixer
Mixer stands out for its flexibility and power in generating test data. It eliminates the need for manual fixture creation, saving significant development time. Its support for a wide array of Python ORMs and ODMs, including Django, SQLAlchemy, Flask-SQLAlchemy, Peewee, Pony, Mongoengine, and Marshmallow, makes it a versatile choice for diverse projects. Features like custom field generators, middlewares, and locale support further enhance its adaptability, allowing developers to create realistic and specific test scenarios with minimal effort.
Links
Explore Mixer further through these official links:
Related repositories
Similar repositories that may be relevant next.

oh-my-hermes: Enhance Hermes Agent with Advanced AI Workflow and Memory
September 17, 2026
oh-my-hermes is an all-in-one plugin designed to significantly enhance the Hermes Agent. It provides advanced coding intelligence, a robust long-term memory system, and optimized workflow packages, transforming standard Hermes requests into structured, actionable tasks with clear operational layers.
ASC: A Super Fast Android Decompiler for Mobile Reverse Engineering
September 17, 2026
ASC is an innovative and exceptionally fast Android decompiler front-end, specifically designed for mobile researchers and agents. It redefines traditional decompilation by directly querying compiled artifacts, offering on-demand code extraction and analysis without heavy preprocessing. This approach results in significantly reduced memory usage and lightning-fast performance, even on large APKs.

Open Index: A Deterministic Memory Layer for Your AI Agents
September 16, 2026
Open Index is a powerful tool for building domain-specific, accurate, and structured data that AI agents can effectively operate on. It enables the creation of a "brain," a searchable and continuously improving context graph tailored to any domain. This system ensures agents have access to reliable, up-to-date information, enhancing their capabilities and decision-making processes.
tooltrim: Drastically Reduce LLM Agent Tool Output Tokens, Improve Accuracy
September 16, 2026
tooltrim provides drop-in compression for LLM agent tool outputs, drastically cutting tokens while often improving answer accuracy. This provider-agnostic solution offers content-aware compression, faithfulness benchmarks, and seamless integration with popular frameworks or as an OpenAI-compatible proxy.
Source repository
Open the original repository on GitHub.
13 counted GitHub visits