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 reads? #55

Open
JohnEmhoff opened this issue Nov 24, 2019 · 2 comments
Open

Streaming reads? #55

JohnEmhoff opened this issue Nov 24, 2019 · 2 comments

Comments

@JohnEmhoff
Copy link

I spent a little time looking through the code, so I apologize if I just missed something -- is it possible to stream the contents of a blob without reading the whole thing to memory or disk? The only methods I see accept a file-like object and write all content directly into it, or similarly a filename.

Both necessitate reading the whole blob before handing control back to the caller, so working with large files is extremely awkward / impossible. I suppose a workaround could be to use this library in a thread and write to a file-like object that acts as in intermediary, but that seems like a huge onus to put on the caller.

@scottwernervt
Copy link
Owner

is it possible to stream the contents of a blob without reading the whole thing to memory or disk?

No, it looks like libraries like boto3 load it into memory first. The AWS S3 Driver can definitely support it according to the boto3 documentation. I need to investigate the other driver libraries. Which cloud service are you using?

@JohnEmhoff
Copy link
Author

I'm using google's platform, but I think this will be an issue for any of the backends due to the API that cloudstorage exposes, if I'm not mistaken.

@scottwernervt scottwernervt added this to To do in Refactor V1 Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants