Skip to main content

Simple CSV export for Django

Project description

Django CSV Exporter

Simple CSV export for Django.

Installation

pip install django-csv-exporter

Usage

Basic Export

from django_csv_exporter import CSVExporter

exporter = CSVExporter(headers=['ID', 'Name'])
exporter.add_row([1, 'Alice'])
exporter.add_row([2, 'Bob'])
return exporter.export()

Streaming Export

from django_csv_exporter import StreamingCSVExporter

exporter = StreamingCSVExporter(
    headers=['ID', 'Name'],
    filename='users',
    serializer=lambda u: [u.id, u.name],
    iterator=User.objects.all().iterator()
)
return exporter.export()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easy_django_csv-0.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easy_django_csv-0.1.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file easy_django_csv-0.1.1.tar.gz.

File metadata

  • Download URL: easy_django_csv-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for easy_django_csv-0.1.1.tar.gz
Algorithm Hash digest
SHA256 074dd11321160e668a57bee37fe2819d77ed35aa04e274fbc72a2c2242669585
MD5 d5b40eb2f58c447228f34cdd5a59b8c7
BLAKE2b-256 e45882a337121245a0f78eb9f8bcb27578d3667344edd8f9dfdf5f0d6e23ada7

See more details on using hashes here.

File details

Details for the file easy_django_csv-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for easy_django_csv-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a5cca7469565493590fb527fdf95f1c0b3fd2f8becd613d614cebbb468ccada
MD5 18ffe6edd186e4fed3e0a23033c9be84
BLAKE2b-256 ece1972a34db26e029aa4beaee5dc4e577b06aee67edbdeaee4b8f7721c65027

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page