Mixer: A Powerful Fixture Replacement for Python ORMs and ODMs

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Mixer: A Powerful Fixture Replacement for Python ORMs and ODMs

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

Analyzed by OSRepos on August 3, 2026

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.

Open Index: A Deterministic Memory Layer for Your AI Agents

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.

AI AgentsKnowledge GraphAgent Memory
tooltrim: Drastically Reduce LLM Agent Tool Output Tokens, Improve Accuracy

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.

PythonLLM AgentsContext Compression
AgentShield: Python Firewall for AI Agent Spend Control

AgentShield: Python Firewall for AI Agent Spend Control

September 16, 2026

AgentShield is a pure Python library designed to prevent runaway AI agents from exceeding budget limits. It offers 10 composable spend rules, evaluated in under 1ms, providing robust cost control. Although its core development has transitioned to sipi.bot, the AgentShield Python package remains available for existing users and its test fixtures are open-source.

PythonAI AgentsCost Control
DA-Forge: Streamlining Declarative Agent Creation for Copilot Notebooks

DA-Forge: Streamlining Declarative Agent Creation for Copilot Notebooks

September 12, 2026

DA-Forge is a Python-based tool by Microsoft designed to automate the creation and deployment of Declarative Agents for Copilot Notebooks. It significantly reduces the manual effort and time required to set up AI assistants with specific grounding references, transforming an 85-minute process into just a few minutes. This tool is essential for developers and researchers working with Copilot Notebooks and Declarative Agents.

PythonMicrosoft 365Copilot

Source repository

Open the original repository on GitHub.

13 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️