mixer
Mixer -- Is a fixtures replacement. Supported Django ORM, SqlAlchemy ORM, Mongoengine ODM and custom python objects.
Decision gist · record as of 2026-08-14
Yes, if you are testing Django or SQLAlchemy models and want to reduce fixture boilerplate. The package is mature (Production/Stable, 955 stars) and has no known vulnerabilities. However, verify compatibility with your specific framework versions—maintenance is dormant (last release 2022-03-23), so if you use very recent Django or SQLAlchemy releases, test thoroughly or check for open issues in the repository before committing to it.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.7+; Django, SQLAlchemy, or another supported ORM/ODM backend must be installed separately depending on which models you want to generate.
- Low install friction with a single runtime dependency (Faker).
- Maintenance is dormant—last release was 2022-03-23 and no commits since 2024-03-08—but the package is marked Production/Stable and has accumulated 955 repository stars, suggesting it is mature and widely used despite infrequent updates.
License · maintenance · safety
BSD (permissive) — BSD license is permissive, allowing use in commercial and open-source projects with minimal restrictions; you must include the license text in distributions.
last release 2022-03-23 (1605 days) · last repo commit 2024-03-08 · 955 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 270,312 downloads/mo, #8,238 on PyPI
Alternatives
Verify before relying
from mixer.backend.django import mixer
user = mixer.blend('auth.user')
message = mixer.blend('auth.user', username='testname')- Whether dormant maintenance (last release 2022-03-23) poses compatibility risks with recent Django/SQLAlchemy versions.
- Whether the package's documented support for Django 3.0 and 3.1 extends to current Django LTS releases.
- Real-world compatibility testing results with Python 3.8, 3.9, and later versions.
What it is and what it does
Mixer is a test-data factory that automatically generates instances of ORM and ODM models with realistic fake data, eliminating the need to hand-write fixtures. It works with Django, SQLAlchemy, Flask-SQLAlchemy, Peewee, Pony, Mongoengine, and Marshmallow, and can also generate instances of plain Python classes. You initialize a mixer for your backend, then call blend() to create a model instance with auto-generated fields; you can override specific fields, control whether objects are saved to the database, and chain operations like cycle() to generate multiple instances.
The package uses Faker to generate human-friendly data by default but can be configured to randomize values instead. It supports nested model generation through double-underscore syntax, field-level generators via register(), and middleware hooks to post-process generated objects. Because maintenance is dormant and the last release was in 2022, compatibility with very recent framework versions may require verification.
Use it for
- Generate Django model instances with realistic data for unit and integration tests without writing verbose fixtures.
- Create SQLAlchemy ORM objects on-the-fly in test suites, with automatic relationship population.
- Populate test databases with bulk data using cycle() to generate multiple instances in a loop.
- Override specific fields while letting Mixer auto-generate the rest, e.g. blend(User, username='admin').
- Test Mongoengine or Marshmallow schemas by generating valid instances with required fields automatically filled.
- Mock nested relationships by using double-underscore syntax to set related object fields without manual creation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are testing Django or SQLAlchemy models and want to reduce fixture boilerplate.
The package is mature (Production/Stable, 955 stars) and has no known vulnerabilities. However, verify compatibility with your specific framework versions—maintenance is dormant (last release 2022-03-23), so if you use very recent Django or SQLAlchemy releases, test thoroughly or check for open issues in the repository before committing to it.
Install
mixer on PyPI
Before you install
Low install friction with a single runtime dependency (Faker). Maintenance is dormant—last release was 2022-03-23 and no commits since 2024-03-08—but the package is marked Production/Stable and has accumulated 955 repository stars, suggesting it is mature and widely used despite infrequent updates.
Requires Python 3.7+; Django, SQLAlchemy, or another supported ORM/ODM backend must be installed separately depending on which models you want to generate.
License in practice
BSD license is permissive, allowing use in commercial and open-source projects with minimal restrictions; you must include the license text in distributions.
Quickstart
from mixer.backend.django import mixer
user = mixer.blend('auth.user')
message = mixer.blend('auth.user', username='testname')
Verify before relying
- Whether dormant maintenance (last release 2022-03-23) poses compatibility risks with recent Django/SQLAlchemy versions.
- Whether the package's documented support for Django 3.0 and 3.1 extends to current Django LTS releases.
- Real-world compatibility testing results with Python 3.8, 3.9, and later versions.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packageFaker |
| Maintenance | Dormant 1,605 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 270,312 / month, #8,238 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/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python ModulesTopic :: Software Development :: TestingTopic :: Utilities |
Evidence: mixer-7.2.2-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 › “sqlalchemy model factory”
- mixerMixer generates test data and model instances for Django, SQLAlchemy,…
- async-factory-boyExtends factory_boy to generate test fixtures asynchronously for…
- polyfactoryPolyfactory generates mock data objects from type hints, supporting…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also sqlalchemy-mixins · async-factory-boy · model-mommy · Flask-SQLAlchemy · factory-boy · sqlbag · flask-mongoengine · sqlalchemy-serializer · peewee · pytest-faker