django-import-export
v4.4.1Django application and library for importing and exporting data with included admin integration.
$ uv add django-import-export====================
django-import-export
Introduction
Straightforward, reliable and comprehensive file import / export for your Django application.
django-import-export is an application and library which lets you manage import / export from / to a variety of sources (csv, xlsx, json etc).
Can be run programmatically, or with optional integration with the Django Admin site:
.. source of this video uploaded to this issue comment: https://github.com/django-import-export/django-import-export/pull/1833#issuecomment-2118777440
https://github.com/django-import-export/django-import-export/assets/6249838/ab56d8ba-c307-4bdf-8fa9-225669c72b37
Features
- Import / export via Admin UI Integration or programmatically
- Import to and from a variety of file formats (csv, json, xlsx, pandas, HTML, YAML... and anything else that tablib supports)
- Preview data before importing in Admin UI
- Support for bulk import
- Handles CRUD (and 'skip') operations during import
- Flexible handling of foreign key relationships
- Many-to-many relationship support
- Validation of imported data
- Define custom transformations for exported data
- Import / export the same model instance as different views
- Export using natural keys_ for portability between environments
- Select items for export via the Admin UI object list
- Select fields for export via the export form
- Export single object instances
- Use django permissions to control import / export authorization
- Internationalization support
- Based on tablib_
- Support for MySQL / PostgreSQL / SQLite
- Extensible - add custom logic to control import / export
- Handle import from various character encodings
- Celery integration
- Test locally with Docker
- Comprehensive documentation_
- Extensible API
- test coverage :100:
- Supports dark mode :rocket:
Example use-cases
django-import-export is designed to be extensible and can be used to support a variety of operations. Here are some examples of how it has been used in the wild:
- Configure external cron jobs to run an import or export at set times
- Use permissions to define a subset of users able to import and export project data
- Safely update project reference data by importing from version controlled csv
- Create portable data to transfer between environments using natural keys
- Manage user access to an application by importing externally version controlled auth user lists
- Add hooks to anonymize data on export
- Modify import / export UI forms to add dynamic filtering on import / export.
- Build a migration layer between platforms, for example take a Wordpress export and import to Wagtail
Getting started
Help and support
- Documentation
- FAQ
- Getting help
- Contributing
- Become a sponsor
- Join our discord
- Tutorial videos on YouTube
- Raise a security issue
Commercial support
Commercial support is provided by Bellaport Systems Ltd
Releases
Details
- Version
- 4.4.1
- License
- BSD License
- Python
- >=3.9
- Maintainer
- Bojan Mihelač <[email protected]>
Release Cadence
Maintainers
- Bojan Mihelač · [email protected]