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.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a962215f96346c6445ba2ee85c48fcd3d535b14aa251fe633dd3e1f18f0288f |
|
MD5 | 0b30afa4022fd7398e461f7281fe992b |
|
BLAKE2b-256 | 771a6131645d6e705cb725e975f8e116296654b5da14293f2e6685a3339e28b6 |