Metadata-Version: 2.4
Name: django-dataexporter
Version: 2.1.0
Summary: Extensible helper to export Django QuerySets and other data to CSV and Excel.
Project-URL: Homepage, https://github.com/lenarother/django-dataexporter
Project-URL: Repository, https://github.com/lenarother/django-dataexporter
Author-email: Stephan Jaekel <steph@rdev.info>, Magdalena Rother <rother.magdalena@gmail.com>
License: MIT
License-File: LICENSE.rst
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: <4,>=3.10
Requires-Dist: django>=3.2
Requires-Dist: openpyxl>=2.6
Provides-Extra: dev
Requires-Dist: coverage[toml]>=5.5; extra == 'dev'
Requires-Dist: pre-commit>=3.0; extra == 'dev'
Requires-Dist: pytest-cov>=2.11; extra == 'dev'
Requires-Dist: pytest-django>=4.2; extra == 'dev'
Requires-Dist: pytest-snapshot>=0.6; extra == 'dev'
Requires-Dist: pytest>=6.2; extra == 'dev'
Requires-Dist: ruff>=0.8; extra == 'dev'
Requires-Dist: tox-uv>=1.0; extra == 'dev'
Requires-Dist: tox>=4.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: sphinx>=3.5; extra == 'docs'
Description-Content-Type: text/x-rst

django-dataexporter
===================

.. image:: https://img.shields.io/pypi/v/django-dataexporter.svg
   :target: https://pypi.org/project/django-dataexporter/
   :alt: Latest Version

.. image:: https://github.com/stephrdev/django-tapeforms/workflows/Test/badge.svg?branch=master
   :target: https://github.com/stephrdev/django-tapeforms/actions?workflow=Test
   :alt: CI Status

.. image:: https://codecov.io/gh/lenarother/django-dataexporter/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/lenarother/django-dataexporter
   :alt: Coverage Status

.. image:: https://readthedocs.org/projects/django-dataexporter/badge/?version=latest
   :target: https://django-dataexporter.readthedocs.io/en/stable/?badge=latest
   :alt: Documentation Status


*django-dataexporter* is a extensible helper to export Django QuerySets and other data to CSV and Excel.


Features
--------

* 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.


Requirements
------------

django-dataexporter supports Python 3.10+ and Django 3.2+.
In addition, the Python package ``openpyxl`` needs to be installed.


Prepare for development
-----------------------

A Python 3.10+ interpreter is required in addition to uv.

Install uv:

.. code-block:: shell

    $ curl -LsSf https://astral.sh/uv/install.sh | sh
    # or
    $ pip install uv

Install dependencies:

.. code-block:: shell

    $ uv sync --extra dev

Set up pre-commit hooks (optional but recommended):

.. code-block:: shell

    $ uv run pre-commit install

Now you're ready to run the tests:

.. code-block:: shell

    $ uv run pytest

Run linting and formatting checks:

.. code-block:: shell

    $ uv run ruff check .
    $ uv run ruff format --check .

Run tests with coverage:

.. code-block:: shell

    $ uv run pytest --cov

Run tests across multiple Python and Django versions (includes linting):

.. code-block:: shell

    $ uv run tox

Format code with ruff:

.. code-block:: shell

    $ uv run ruff format .

Run pre-commit on all files:

.. code-block:: shell

    $ uv run pre-commit run --all-files


Resources
---------

* `Documentation <https://django-dataexporter.readthedocs.io>`_
* `Bug Tracker <https://github.com/lenarother/django-dataexporter/issues>`_
* `Code <https://github.com/lenarother/django-dataexporter/>`_
