--- id: django-fixture-magic version: "0.1.5" license: BSD license_treatment: permissive maintenance: dormant --- # django-fixture-magic — A few extra management tools to handle fixtures. License: permissive · Maintenance: dormant · Downloads: 96.6K/mo ## 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 above — 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 pip install django-fixture-magic uv add django-fixture-magic 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 96.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags django fixture generation, dump database objects to json, merge json fixtures, django foreign key fixtures, fixture reordering, django test data export, fixture dependency resolution, django-fixtures, test-data, legacy [View on SkillFed](https://skillfed.io/packages/django-fixture-magic) · [View on PyPI](https://pypi.org/project/django-fixture-magic/)