-
Notifications
You must be signed in to change notification settings - Fork 18
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
Support BytesIO/Stream-like objects instead of just filepath #2
Comments
@AnkurDedania This is a great idea! There is no reason that pyfive shouldn't be able to read from any object that correctly implements valid |
Jon, this is Benj, Ankur and I talked to you at PyDataChi. If I understand correctly, the BytesIO option might allow you to read an HDF5 file from an object store, right? For example, MS Azure has an API function called Another example of this is accessing memory images of HDF5 files. See the the relevant conversations regarding h5py, xarray, and pytables github forums here, here, and here. |
@synaptic Good to hear from you. Reading from BytesIO or other file like objects should all you to read a HDF5 file which exists entirely in memory. With the changes in 94d5c64 as long as you pass a object which has For example the follow works: >>> import pyfive
>>> open('./tests/latest.hdf5')
>>> hfile = pyfive.File(f)
>>> hfile.attrs['attr1']
-123
>>> f.close() |
@jjhelmus I got In order to work fully with my data I would need support for chunks, compression, and shuffle. I see you have a branch for compression. Maybe we can help. |
@synaptic Great to hear that I'm not particularly surprised to hear about the less than optimal performance as efficiency has not been a priority. When reading data from a Dataset, pyfive currently loads all chunks into memory before slicing the requested data. This behavior is very inefficient when only a small region of the data is requested which could be extracted from a small number of chunks. Improving this is on the The |
Support BytesIO/Stream-like objects instead of just filepath
The text was updated successfully, but these errors were encountered: