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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for django_fast_export-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b92f10ed966f21e419029302d9cd77c70bc5df6cba518bd82cae425bc769b23c |
|
MD5 | 9b2777a6e9932d5e6d1bb275f81a7431 |
|
BLAKE2b-256 | 6f3b206e1361a03df38992b3200d4a42e45088e67ecb6b6c85262b6859b748f0 |