django-import-export
Django application and library for importing and exporting data with included admin integration.
What it is and what it does
django-import-export is a Django application that lets you move data in and out of your models using common file formats like CSV, JSON, and XLSX. It works both programmatically and through a built-in Django Admin interface, so non-technical users can import or export data without writing code. The package handles reading files, mapping columns to model fields, validating data, and deciding whether to create new records or update existing ones.
It relies on tablib for format support and diff-match-patch for diffing, and integrates with Django's permission system to control who can import or export. It supports foreign keys, many-to-many relationships, custom transformations, and bulk operations. The Admin integration includes a preview step so users can review data before committing it to the database.
Use it for:
- Bulk-load user or reference data from CSV files into your Django models via the Admin UI.
- Export model instances to multiple formats (CSV, JSON, XLSX) for reporting or data portability.
- Set up scheduled imports via cron jobs to sync external data sources into your application.
- Migrate data between different platforms by exporting from one system and importing into Django.
- Provide non-technical staff with a UI to manage data imports without direct database access.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Handles import and export of data to and from Django models across multiple file formats (CSV, JSON, XLSX, etc.), with optional Django Admin integration for UI-driven operations.
Yes. The package is actively maintained, has no known vulnerabilities, low install friction, and solves a common Django problem with both programmatic and UI-driven workflows. It's suitable for production use if you need import/export functionality; the BSD license poses no restrictions.
Install
django-import-export on PyPI
pip
pip install django-import-exportuv
uv add django-import-exportpoetry
poetry add django-import-exportInstalling django-import-export
Before you install
Low friction installation with 3 runtime dependencies. Actively maintained with recent commits and no known vulnerabilities.
License in practice
BSD license (permissive); you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install django-import-export
from django_import_export import resources
from django_import_export.admin import ImportExportModelAdmin
class MyModelResource(resources.ModelResource):
class Meta:
model = MyModel
class MyModelAdmin(ImportExportModelAdmin):
resource_class = MyModelResource
Requires Django 4.2 or later and Python 3.9 or later; Django must be installed and configured.
Verify before relying
- Performance characteristics when importing or exporting very large datasets.
- Specific validation error messages and how they surface in the Admin UI.
- Reliability of character encoding handling across different file sources.
Package facts
| License | Copyright (c) Bojan Mihelac and individual contributors. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — diff-match-patch, Django, tablib |
| Maintenance | actively maintained — 101 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 3,017,559/month — #2,787 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_import_export-4.4.1-py3-none-any.whl
Keywords: django, import, export
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
django-postgres-copyProvides Django ORM integration for…
permissive · top 5,000 on PyPI
xlsx2csvConverts XLSX spreadsheet files to CSV format,…
permissive · top 5,000 on PyPI
django-admin-csvexportAdds a Django admin action that exports…
permissive · top 15,000 on PyPI
tablibTablib converts tabular data between multiple…
permissive · top 5,000 on PyPI
DataRecorderDataRecorder provides buffered writing tools…
permissive · top 15,000 on PyPI
DrissionRecordBuffers and writes data to files (xlsx, csv,…
permissive · top 15,000 on PyPI
django-sql-explorerA Django-based SQL query editor and business…
permissive · top 15,000 on PyPI
django-data-browserProvides an interactive web interface for…
permissive · top 15,000 on PyPI
pyexcelProvides a single API to read, write, and…
permissive · top 5,000 on PyPI
django-unfoldReplaces Django's default admin interface with…
permissive · top 5,000 on PyPI