NASA Earthdata¶
obstore.auth.earthdata.NasaEarthdataCredentialProvider ¶
A credential provider for accessing NASA Earthdata to be used with S3Store.
This credential provider uses requests
, and will error if that cannot be imported.
NASA Earthdata supports public in-region direct S3 access. This credential provider automatically manages the S3 credentials.
Note
Note that you must be in the same AWS region (us-west-2
) to use the
credentials returned from this provider.
Example:
from obstore.auth.earthdata import NasaEarthdataCredentialProvider
from obstore.store import S3Store
credential_provider = NasaEarthdataCredentialProvider(username="...", password="...")
store = S3Store("bucket_name", credential_provider=credential_provider)
__init__ ¶
close ¶
close() -> None
Close the underlying session.
You should call this method after you've finished all obstore calls to close the underlying requests.Session.
obstore.auth.earthdata.NasaEarthdataAsyncCredentialProvider ¶
An async credential provider for accessing NASA Earthdata to be used with S3Store.
This credential provider should be preferred over the synchronous NasaEarthdataCredentialProvider whenever you're using async obstore methods.
This credential provider uses aiohttp
, and will error if that cannot be imported.
NASA Earthdata supports public in-region direct S3 access. This credential provider automatically manages the S3 credentials.
Note
Note that you must be in the same AWS region (us-west-2
) to use the
credentials returned from this provider.
Example:
from obstore.auth.earthdata import NasaEarthdataAsyncCredentialProvider
from obstore.store import S3Store
credential_provider = NasaEarthdataAsyncCredentialProvider(
username="...",
password="...",
)
store = S3Store("bucket_name", credential_provider=credential_provider)
__init__ ¶
close
async
¶
close() -> None
Close the underlying session.
You should call this method after you've finished all obstore calls to close the underlying aiohttp.ClientSession.