skillfed

django-queryset-csv

A simple python module for writing querysets to csv

django-queryset-csv v1.1.0 85.1K downloads/30d#13,953 on PyPI188
Copyleft license Abandoned released

What it is and what it does

django-queryset-csv is a lightweight utility that turns Django QuerySet objects into CSV files or HTTP responses. It handles the common pattern of filtering data in a view, then exporting it as a downloadable CSV attachment. The package wraps Django's CSV writer and adds convenience features like automatic filename generation, optional timestamp suffixes, and field mapping for custom column headers.

The package provides two main entry points for exporting to CSV and writing to files. It supports foreign key traversal using Django's double-underscore syntax, custom field serialization functions, and passthrough arguments to Python's standard csv module. However, the project has been abandoned since 2020 and targets only Python 3.5 and Django 1.8, making it risky for modern applications.

Use it for:

  • Export filtered model data as a CSV download in a Django view without writing boilerplate CSV code.
  • Generate timestamped CSV exports for reports or data backups from a QuerySet.
  • Serialize related model fields via foreign keys into a single CSV using Django's field lookup syntax.
  • Customize CSV column headers and field formatting via field_header_map and field_serializer_map parameters.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Exports Django QuerySet data to CSV format with automatic Unicode-to-UTF-8 encoding and HTTP response rendering.

No. The package is abandoned (last commit 2020-10-01) and targets Python 3.5 and Django 1.8, both long out of support. High install friction and no active maintenance make it unsuitable for new projects. Modern Django versions and Python 3.8+ are standard; this package will likely fail or require forking.

Install

django-queryset-csv on PyPI

pip

pip install django-queryset-csv

uv

uv add django-queryset-csv

poetry

poetry add django-queryset-csv

Installing django-queryset-csv

Before you install

High install friction reported. Package is abandoned as of 2020-10-01 with no recent maintenance; last release was 2020-03-24. Supports only Python 3.5 and Django >= 1.8, both well out of current support windows.

License in practice

Licensed under GPL (copyleft). Any derivative work or distribution must also be open-source under GPL terms.

Quickstart

pip install django-queryset-csv

from django_queryset_csv import render_to_csv_response

def csv_view(request):
    qs = MyModel.objects.filter(active=True).values('id', 'name')
    return render_to_csv_response(qs)

Requires Django >= 1.8 and Python 3.5; both versions are no longer supported by their maintainers.

Verify before relying

  • Whether the package works with modern Django versions (3.2+) and Python 3.8+ despite only declaring 3.5 support.
  • Current state of the GitHub repository and whether it accepts pull requests or has a maintainer.
  • Actual import path and module structure of the installed package.

Package facts

License not declared (copyleft)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance abandoned — 2,334 days since the last release
Last repo commit
First released
Downloads 85,083/month — #13,953 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: django-queryset-csv-1.1.0.tar.gz

Keywords: django, queryset, csv

Development Status :: 4 - BetaEnvironment :: PluginsFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License (GPL)Programming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.5

Tags

django queryset to csvexport django data csvdjango csv exporterqueryset csv downloaddjango csv responsedjango csv writer
djangocsv-exportabandoned

More Front-Ends packages