iterative / PyDrive2

Google Drive API Python wrapper library. Maintained fork of PyDrive.
https://docs.iterative.ai/PyDrive2
Other
590 stars 70 forks source link

Regsister fsspec interface with fsspec #354

Open martindurant opened 4 months ago

martindurant commented 4 months ago

The following stackoverflow question brought to my attention that, although this repo has an fsspec-compatible class, it is not registered with fsspec, so calls like fsspec.open("gdrive://...") don't work. Even importing the library does not seem to do the registration. (They DO work with the older gdrivefs.)

We should figure out what the appropriate protocol to use is and make sure that users have as smooth a path as possible to loading data off gdrive via fsspec.

shcheklein commented 4 months ago

@martindurant can you show how / where is it done usually?

martindurant commented 4 months ago

https://filesystem-spec.readthedocs.io/en/latest/api.html#fsspec.registry.register_implementation is probably what you want. If you call this on import of pydrive2.fs , then future calls ton fsspec.open() will know about it.