django-dataexporter is a extensible helper to export Django QuerySets and other data to CSV and Excel.
- Exporter class to generate CSV and Excel files out of QuerySets and other iterables.
- Factory to generate Django ModelAdmin actions to trigger an export out of Django's famous admin interface.
django-dataexporter supports Python 3.10+ and Django 3.2+.
In addition, the Python package openpyxl needs to be installed.
A Python 3.10+ interpreter is required in addition to uv.
Install uv:
$ curl -LsSf https://astral.sh/uv/install.sh | sh
# or
$ pip install uvInstall dependencies:
$ uv sync --extra devSet up pre-commit hooks (optional but recommended):
$ uv run pre-commit installNow you're ready to run the tests:
$ uv run pytestRun linting and formatting checks:
$ uv run ruff check .
$ uv run ruff format --check .Run tests with coverage:
$ uv run pytest --covRun tests across multiple Python and Django versions (includes linting):
$ uv run toxFormat code with ruff:
$ uv run ruff format .Run pre-commit on all files:
$ uv run pre-commit run --all-files