klen

mixer: Generate Test Data for Python Models

Mixer is a Python library for generating instances of Django, SQLAlchemy, Flask-SQLAlchemy, and other model types. It helps replace hand-written fixtures with generated test data, with controls for field values and database commits.

InactivePythonLibraryTestingDjango
View on GitHub Compare
Stars
953
Forks
91
Stars, last 30 days
+1
Last commit
2.6 years ago
Contributors
37

Our take

Inactiveno commits in over a year

Health score

26/100

How it is scored
Activity
19
Community
44
Issues
21
Pull requests
20

+1 stars in the last 30 days

Mixer covers a broad range of Python model frameworks, but its prolonged inactivity and concentrated contribution history make current maintenance an important adoption concern.

Good fit if

  • Your tests use one of the supported Python model frameworks and benefit from generated instances instead of hand-maintained fixtures.
  • You can validate the library against your Python and framework versions, and are prepared to maintain a fork if needed.
  • Your team is comfortable with the README's stated BSD license, while noting that repository license metadata is not asserted.

Look elsewhere if

  • You need a project with recent commits, releases, or visible recent issue and pull-request activity. The measured health reports no commits in over a year and no release in the past year.
  • Your project depends on rapid upstream fixes: despite 37 contributors overall, most of the code comes from one person, and the measured data shows no recent issue closures or merged pull requests.
All health signals
Last commit2024-03-08 (2.6 years ago)
Commits, last 90 days0
Releases, last 12 months0
Contributors37 (top contributor: 88% of commits)
Issues closed, last 90 days0
Pull requests merged, last 90 days0
Project age13 years

Checked on 2026-10-24 with the GitHub API.

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

954

Forks

91

Change since Nov 14, 2026: 0 stars·0 forks

Overview

Mixer is a Python library for generating instances of Django and SQLAlchemy models, as well as models and objects from Flask-SQLAlchemy, Peewee, Pony, Mongoengine, Marshmallow, and custom schemes. It addresses the work of setting up test data by creating model instances with generated values and, where applicable, saving them to a database.

It is aimed at Python developers writing tests for applications that use these frameworks or custom object models. You can override generated fields, build related objects, and choose whether generated objects are committed to a database.

Key Features

  • Generates model instances for Django, SQLAlchemy, Flask-SQLAlchemy, Peewee, Pony, Mongoengine, and Marshmallow.
  • Creates instances for custom Python schemes as well as framework models.
  • Builds related objects and lets you set nested field values, such as a related user's username.
  • Supports selecting existing relationship values, forcing random values, or skipping field generation.
  • Generates multiple instances with cycle() and can draw field values from a custom generator.
  • Allows custom field generators, type factories, and middleware for processing generated values.
  • Offers controls for generated data style, database commits, and Faker locale.

Use Cases

  • Django developers who need model instances for tests without maintaining large sets of fixture files.
  • Flask or SQLAlchemy teams that want generated records and control over whether they are persisted.
  • Test authors who need related objects with specific field values, such as a message linked to a named user.
  • Python developers testing custom object schemes or serialization schemas with generated data.

What you need

Detected in the repository

  • Python (from setup.py)
  • A test suite and automated checks on GitHub Actions

Getting Started

Install with pip:

pip install mixer

See the README for framework-specific setup and usage details.

License in Plain Words

No standard license was detected. Without a license, the default copyright rules apply: you may read the code, but not reuse it. Check the repository or ask the authors.

Alternatives

  • factory_boy: factory_boy uses configurable factories to build model instances, while mixer generates instances by inspecting model fields and supports multiple model types.
ProjectLanguageLicenseStarsStatus
mixerPython–953Inactive
factory_boyPythonMIT3.8kQuiet

Considerations

The project is marked inactive in the supplied health data. It has had no commits in over a year, no release in the past year, and no measured recent issue closures or merged pull requests. Although 37 contributors are recorded, contribution is heavily concentrated in one person, so teams should assess their ability to handle compatibility fixes and ongoing maintenance.

The README lists Python 3.7 or newer and notes that support for Python 2 ended with version 6.2. Framework integrations have their own dependencies, so check the requirements for the backend you plan to use. The README describes the project as BSD-licensed, but the supplied repository metadata reports no asserted license; verify the applicable license before adoption.

Found this useful?

Share it with someone who would like mixer.

Comparisons