Skip to content

earthaccess-auth

earthaccess-auth contains only the NASA Earthdata Login (EDL) authentication core of earthaccess. It has few dependencies. It includes the login strategies, token handling, the S3 credential exchange for each DAAC, and a requests session that keeps authentication across redirects.

Optional extras add integrations with fsspec, obstore, and icechunk.

Use this library to read data from NASA cloud buckets when you don't need CMR search.

Install

pip install earthaccess-auth            # requests + tinynetrc only
pip install earthaccess-auth[fsspec]    # + fsspec/aiohttp HTTPS session
pip install earthaccess-auth[obstore]   # + obstore credential provider
pip install earthaccess-auth[icechunk]  # + icechunk credentials

Quickstart

import earthaccess_auth

auth = earthaccess_auth.login()  # tries env vars, then ~/.netrc, then prompts
if not auth.authenticated:
    raise SystemExit("no Earthdata Login credentials found")
token = auth.token["access_token"]

login() returns a new Auth instance each time. You can keep more than one authenticated instance and pass each one where you need it.

Where to go next