Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streaming responses #207

Open
aidanlister opened this issue Nov 7, 2015 · 5 comments
Open

Streaming responses #207

aidanlister opened this issue Nov 7, 2015 · 5 comments

Comments

@aidanlister
Copy link

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

@kennethreitz
Copy link
Contributor

This is not currently planned.

@jarshwah
Copy link

jarshwah commented Mar 2, 2017

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

@iurisilvio
Copy link
Collaborator

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
Copy link
Contributor

ZuluPro commented Aug 8, 2018

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:

  • Add the function export_stream_set to the possible ones
  • Update export_set to use the export_stream_set and launch .getvalue() to get a string.

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
Copy link
Contributor

ZuluPro commented Aug 8, 2018

POC here: #337

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants