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
File details
Details for the file django_fast_export-0.1.1.tar.gz
.
File metadata
- Download URL: django_fast_export-0.1.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.24.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9d72b2743bc1d5058203f601919f2ab1fb2dc22a78cb39163aefbb3c2f2f1c9 |
|
MD5 | 59bdac229d8a634ef246c112a324ee9c |
|
BLAKE2b-256 | 32699814b152e6b913004d1cdf3065917de18ea6f4355c8abaecf3dcfc151acc |
Provenance
File details
Details for the file django_fast_export-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: django_fast_export-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.24.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a962215f96346c6445ba2ee85c48fcd3d535b14aa251fe633dd3e1f18f0288f |
|
MD5 | 0b30afa4022fd7398e461f7281fe992b |
|
BLAKE2b-256 | 771a6131645d6e705cb725e975f8e116296654b5da14293f2e6685a3339e28b6 |