iterative / PyDrive2

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

fs: simplify auth #211

Closed efiop closed 2 years ago

efiop commented 2 years ago

Compared to how we were using it in dvc before:

1) doesn't require/accept tmp_dir at all, caches creds in appdirs("pydrive2fs", appauthor=False). 2) caching is per client_id, so no risk of using mismatched client_id and cached creds. If user supplies a profile(defaults to default) - we'll also cache it by profile to support multiple google users using the same client_id. 3) renamed service_account_json_file_path into client_json_file_path for consistency. 4) renamed service_account_user_email into client_user_email for consistency.

Other than that, this is mostly old code.

Fixes https://github.com/iterative/PyDrive2/issues/193

efiop commented 2 years ago

For the record: can't add fs to the https://docs.iterative.ai/PyDrive2/pydrive2/ as sphinx doesn't like existing code. Will get back to it in a followup.

efiop commented 2 years ago

@shcheklein Should be alright for now. Please take a look when you'll have time.