Allow `gspread.oauth()` to look for file in another directory
See original GitHub issueIs your feature request related to a problem? Please describe.
Not really a problem, but I got bitten a bit by it. I used to be using a service account and service_account
allows users to store google credentials where they want. This is particularly relevant for the flow I have implemented in my CLI tool to import google sheets to SQL databases (sheetwork
) where I require users to put credentials into a .sheetwork
folder.
gspread.oauth
doesn’t take arguments for filename, but since it uses load_credentials()
https://github.com/burnash/gspread/blob/master/gspread/auth.py#L93 I would assume this is possible.
Is there a reason why this might not be allowed? Could it break a few things?
Describe the solution you’d like
allow oaut()
to take a filename
argument that is passed to load_credentials
If you agree that this would be possible, I’d be happy to contribute to the change.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:12 (8 by maintainers)
Top GitHub Comments
I faced the same problem when start to use gspread. Workaround is to change default creds location by modifying gspread settings and default function parameters. Not very elegant, but working solution:
But now i switch to service accounts and do not use this.
I believe when @burnash gets around to giving another look at the PR it should be good as all the changes they asked for have been implemented.