iterative / PyDrive2

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

File `client_config_backend` with `fsspec` #262

Closed aripollak closed 1 year ago

aripollak commented 1 year ago

I'd really like to be able to combine the ease of client_config_backend='file' with the ease of fsspec/GDriveFileSystem. Currently it looks like the only supported mechanism is to pass the client config directly to the GDriveFileSystem() constructor. Could this be implemented? Pretty please? :heart_eyes_cat: Maybe it would be more ideal for GDriveFileSystem() to take an optional settings argument that was passed directly to GoogleAuth?

shcheklein commented 1 year ago

There are multiple ways to provide auth for fsspec:

https://github.com/iterative/PyDrive2/blob/main/pydrive2/fs/spec.py#L158-L171

Among other things, you can pass GoogleAuth instance. which in turn can be instantiated in any supported way, including the `client_config_backend='file'.

Closing this, but let us know if there are more question.