-
Notifications
You must be signed in to change notification settings - Fork 8
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
feat: add stream_href method #123
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #123 +/- ##
==========================================
+ Coverage 79.73% 79.79% +0.06%
==========================================
Files 16 16
Lines 982 985 +3
==========================================
+ Hits 783 786 +3
Misses 199 199 ☔ View full report in Codecov by Sentry. |
Actually, I may have jumped the gun on this one. If it isn't something that you want to support as part of the public API without a solid use-case then please leave this unmerged for a short while until I re-confirm the need. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the name change, we should also add a stac_asset.blocking.open_href
.
I'm not sure there's a particularly elegant way to make a blocking version of I did find a snippet on SO that shows how to do this: https://stackoverflow.com/a/55164899. I don't know how you feel about it, but I wouldn't want to maintain something like that in this lib--if a user really needs to use |
44b85d8
to
319325b
Compare
Nope, makes a lot of sense, thanks for pointing that out. |
Related issues and pull requests
Description
I have a case where I am using
read_href
, but can significantly decrease memory usage if I use the chunks as they are downloaded rather than waiting for the the complete byte stream fromread_href
. Seeing thatread_href
is concatenating a stream, this change simply splits the chunked downloading fromread_href
into a new methodstream_href
, whichread_href
uses internally.Checklist