Skip to content

ObjectStore to FsspecStore #525

@chitralverma

Description

@chitralverma

Can a capability be added to convert an ObjectStore to an FsspecStore

Use: This can allow seamless usage in a code that involves fsspec only parts and non fsspec parts. For example, in my project, there are cases where I have to interact with GCS and I use the async list, list_with_delimiter etc. focusing on performance, but in other parts of the same code base i use with duckdb/ pyarrow to read data as well from same GCS as duckdb/ pyarrow both talk fsspec. So right now I create 2 separate handles and maintain them but an API like below can be very useful.

wdyt?

from obstore.store import ObjectStore
from obstore.fsspec import FsspecStore

# Option A
some_store: ObjectStore = ...
fs: FsspecStore = some_store.to_fsspec()

# Option B
some_store: ObjectStore = ...
fs: FsspecStore = FsspecStore.from_store(some_store)

# Option C (change the constructor of FsspecStore completely)
some_store: ObjectStore = ...
fs: FsspecStore = FsspecStore(some_store)

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