xarray_eop.get_credentials#
- xarray_eop.get_credentials(url: EOPath | str, profile: str | None = None) dict[str, Any]#
Get credentials given an url path For S3 protocol, it looks first for the AWS-like (
AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_ENDPOINT_URL) or S3-like (S3_KEY,S3_SECRET,S3_URL) environment variables, or if a profile is givenNote that only S3 protocol is implemented and the use of a profile name is not yet implemented
- Parameters:
url – cloud-storage path
profile – profile name to get the correct credentials, by default None. Not yet implemented
optional – profile name to get the correct credentials, by default None. Not yet implemented
- Return type:
dictionary of secret variables to be used in storage_options parameters for xarray/datatree functions
- Raises:
NotImplementedError –
cloud-storage different from S3 * use of profile name