One recurring headache in Django projects is keeping seed data consistent across environments.
- You add reference data (categories, roles, settings) in development… and forget to sync it to staging or production.
- Different environments drift apart, leading to version conflicts or missing records.
- Deployment scripts end up with ad-hoc JSON fixtures or SQL patches that are hard to maintain.
I got tired of that. So I built django-synced-seeders — a simple, ORM-friendly way to version and sync your seed data.
What it does
- Versioned seeds: Every export is tracked so you don’t re-import the same data.
-
Environment sync: Run
syncseeds
in staging or production to automatically bring them up to date. - Export / Import commands: Seamlessly move reference data between environments.
- Selective loading: Only load the seeds you need by defining exporting QuerySets.
Quick start
pip install django-synced-seeders
or use uv
uv add django-synced-seeders
Add it to INSTALLED_APPS
in settings.py
, then run:
python manage.py migrate
Define your seeders (e.g. seeders.py
):
from seeds.registries import seeder_registry
from seeds.seeders import Seeder
from .models import Category, Tag
@seeder_registry.register()
class CategorySeeder(Seeder):
seed_slug = "categories"
exporting_querysets = (Category.objects.all(),)
delete_existing = True
@seeder_registry.register()
class TagSeeder(Seeder):
seed_slug = "tags"
exporting_querysets = (Tag.objects.all(),)
Export locally:
python manage.py exportseed categories
python manage.py exportseed tags
Sync on another environment:
python manage.py syncseeds
Now your development, staging, and production stay aligned — without manual JSON juggling.
Why this matters
- Prevents “works on my machine” seed data issues.
- Keeps environments aligned in CI/CD pipelines.
- Easier to maintain than fixtures or raw SQL.
- Open source (MIT license) and ready for contributions.
If you’ve ever wrestled with fixtures or forgotten to copy seed data between environments, I think you’ll find this useful.
👉 Check it out here: github.com/Starscribers/django-synced-seeders
👉 Join my Discord Server: https://discord.gg/ngE8JxjDx7
Top comments (0)