jazzband / tablib

Python Module for Tabular Datasets in XLS, CSV, JSON, YAML, &c.
https://tablib.readthedocs.io/
MIT License
4.56k stars 587 forks source link

Streaming responses #207

Open aidanlister opened 8 years ago

aidanlister commented 8 years ago

Can we use tablib to stream responses, eg have dataset.csv return a generator?

kennethreitz commented 8 years ago

This is not currently planned.

jarshwah commented 7 years ago

Sorry to rehash, but would you accept a patch that implemented this support?

iurisilvio commented 7 years ago

I'm +1 for it, but it needs some design decisions. Which operations we'll be able to support for streaming imports and exports?

I know openpyxl has optimized reader/writer (http://openpyxl.readthedocs.io/en/default/optimized.html) and it is really useful.

Reopening the issue for discussion. I think it is possible to make it in tablib.

ZuluPro commented 5 years ago

Hello @iurisilvio @jarshwah @kennethreitz

A lot of formats use file-like object but export_set returns stream.getvalue() to get a string. So my proposition is the following:

I think we could gain in features just by split code in several functions. And I really need to be able to work with streams :D

What do you think about ?

ZuluPro commented 5 years ago

POC here: #337