Skip to main content

Fast exporting of data from the Django admin panel

Project description

Utilities for quickly streaming CSV responses to the client

Thanks, https://docs.djangoproject.com/en/4.0/howto/outputting-csv/

Example usage:

from django_fast_export.csv import StreamingCSVResponse

response = StreamingCSVResponse.from_queryset(queryset)

Or with additional fields:

from django_fast_export.csv import StreamingCSVResponse, all_values, all_verbose_names

def generate():
    yield (all_verbose_names(queryset.model) + ["Lösungen"])
    yield from (
        (all_values(instance) + [instance.get_solutions()]) for instance in queryset
    )

response = StreamingCSVResponse(generate())

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

django_fast_export-0.1.0.tar.gz (3.0 kB view hashes)

Uploaded Source

Built Distribution

django_fast_export-0.1.0-py3-none-any.whl (3.5 kB view hashes)

Uploaded Python 3

Supported by

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