skillfed

django-fixture-magic

A few extra management tools to handle fixtures.

django-fixture-magic v0.1.5 96.6K downloads/30d#13,206 on PyPI389
Permissive license BSD DORMANT released

What it is and what it does

django-fixture-magic extends Django's management commands with tools for exporting database state as JSON fixtures. It addresses the common problem of generating test data that respects foreign-key relationships: when you dump a Book object, it automatically includes its related Author, preventing foreign-key errors when loading fixtures into a fresh database. The package provides four commands: dump_object (export objects and their dependencies), merge_fixtures (deduplicate across multiple fixture files), reorder_fixtures (reorder models to satisfy load order), and custom_dump (export complex multi-dependent object graphs via configuration).

The package has no runtime dependencies and installs as a pure Python wheel. However, it is dormant—the latest release dates to 2020-07-15 and targets Django 1.8–2.1 and Python 2.7/3.6. Users on modern versions should verify compatibility before adopting.

Use it for:

  • Generate test fixtures from database snapshots while automatically including all related objects via foreign keys.
  • Combine multiple partial fixture files into a single deduplicated fixture for test setup.
  • Reorder fixture objects to load in dependency order, avoiding foreign-key constraint violations during test initialization.
  • Export complex multi-model object graphs via a single custom_dump command configured with dependents and ordering rules.
  • Automate fixture generation in test pipelines to keep test data synchronized with schema changes.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Django management commands to dump database objects with their foreign-key dependencies into JSON fixtures, merge multiple fixtures, and reorder fixtures to resolve foreign-key load errors.

No, unless you are maintaining a legacy Django 1.8–2.1 project on Python 2.7 or 3.6. The package is dormant and compatibility with modern Django and Python versions is unverified. For current projects, consider modern alternatives or Django's built-in dumpdata/loaddata with custom logic.

Install

django-fixture-magic on PyPI

pip

pip install django-fixture-magic

uv

uv add django-fixture-magic

poetry

poetry add django-fixture-magic

Installing django-fixture-magic

Before you install

Low install friction with no runtime dependencies. Package is dormant (last release 2020-07-15, last commit 2023-10-26) and targets Django 1.8–2.1 and Python 2.7/3.6, making it potentially incompatible with modern versions.

License in practice

BSD license is permissive and poses no restrictions on use, modification, or distribution.

Quickstart

pip install django-fixture-magic

Add to INSTALLED_APPS in settings.py:
    'fixture_magic',

Then run:
    ./manage.py dump_object APP.MODEL PK1 PK2 > my_fixture.json

Requires Django 1.8–2.1 and Python 2.7 or 3.6; compatibility with modern versions unverified.

Verify before relying

  • Whether the package works with Django versions beyond 2.1
  • Whether the package is compatible with Python versions beyond 3.6
  • Current maintenance status and whether dormancy indicates abandonment or stable maturity

Package facts

License BSD (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 2,221 days since the last release
Last repo commit
First released
Downloads 96,577/month — #13,206 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django_fixture_magic-0.1.5-py2-none-any.whl

Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: DjangoFramework :: Django :: 1.10Framework :: Django :: 1.11Framework :: Django :: 1.8Framework :: Django :: 1.9Framework :: Django :: 2.0Framework :: Django :: 2.1Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: Software Development :: Libraries :: Python Modules

Tags

django fixture generationdump database objects to jsonmerge json fixturesdjango foreign key fixturesfixture reorderingdjango test data exportfixture dependency resolution
django-fixturestest-datalegacy

More Python Modules packages