Open rle-earthdaily opened 5 days ago
Very nice idea @rle-earthdaily, it's way better than a dotenv file indeed. Usually default/suggested way to use it is to store in environment variables, but the same method as boto3/aws is really interested and I think easier to implement for users. So yeah let's go ! But let's be careful on breaking changes.
As an earthdaily package user, I'd like to store the EDS_AUTH_URL, EDS_CLIENT_ID and EDS_SECRET variables in a file outside of the repository, without having to manually resort to dotenv. I think we could use a similar mechanism to AWS' way of handling credentials (i.e. store credentials in ~/.aws/credentials on MacOs/linux and in %USERPROFILE%.aws\credentials on Windows) by defining a similar ~/.earthdaily/credentials file.
The package should try to read credentials in the following order:
This would provide a first step for named profiles that point to different credentials.