django-queryset-csv
A simple python module for writing querysets to csv
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-csvuv
uv add django-queryset-csvpoetry
poetry add django-queryset-csvInstalling 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
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
csv23Provides a Python 3-style unicode CSV API that…
permissive · top 15,000 on PyPI
drf-excelAdds an Excel spreadsheet (xlsx) renderer to…
permissive · top 15,000 on PyPI
backports.csvProvides Python 3's csv module API for Python…
unclear · top 15,000 on PyPI
django-chunkatorIterates over large Django QuerySets in…
permissive · top 15,000 on PyPI
django-tables2django-tables2 generates HTML tables from…
permissive · top 5,000 on PyPI
django-mock-queriesMocks Django QuerySet operations in memory for…
permissive · top 15,000 on PyPI
django-datatables-viewProvides a Django view base class that handles…
permissive · top 15,000 on PyPI
djangoqlDjangoQL provides an advanced search query…
permissive · top 15,000 on PyPI
unicodecsvDrop-in replacement for Python 2.7's csv module…
permissive · top 5,000 on PyPI