gedidb.EarthDataAuthenticator#

class gedidb.EarthDataAuthenticator(earth_data_dir: str | None = None, strict: bool = False)[source]#

Handles Earthdata authentication by managing .netrc and cookie files for automated login. Idempotent: will reuse existing .netrc credentials and will not append duplicates.

__init__(earth_data_dir: str | None = None, strict: bool = False)[source]#

Initialize the authenticator. :param earth_data_dir: Directory to store .netrc and cookies. Defaults to the user’s home directory. :param strict: If True, fail if credentials are missing without prompting.

Methods

__init__([earth_data_dir, strict])

Initialize the authenticator.

authenticate()

Ensure valid Earthdata credentials exist in .netrc and that cookies are present.