Skip to content

Support external pyo3-object_store in obstore #566

@aseyboldt

Description

@aseyboldt

This is more a feature request than an issue.

I work on a rust library (nutpie) that can write its results to a zarr store with zarrs.
The library is usually used from python, so pyo3-object_store is perfect to let me configure the store in the python part of the library, pass it to rust and let the rust part write the results to the store.

However, as I found out after writing the whole new zarr backend, I don't think I can then use the resulting store from python with zarr. zarr/xarray does support obstore, but strictly requires that the store was created in obstore, and does not accept a store created from a different rust library with pyo3-object_store.

For file based storage, I can simply recreate a separate store that points to the written files, but I think for other object stores that will be quite inefficient, and for the memory store (which I think has to be the default in my application) it does not work at all. I think I can also not safely access the store while it is still being written to, so I can't give users the ability to see intermediate results.

I'm not sure how difficult it would be to support a use case like this?
Maybe there could be a function like the existing register_store_module, that exports the functions of obstore itself?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions