easysnowdata.auth.Provider#

class easysnowdata.auth.Provider[source]#

Bases: object

One credentialed service. Subclasses implement the four verbs.

  • detect() — environment variables and file existence only; no network, no heavy imports (it runs at import easysnowdata).

  • login() — interactive setup that persists per the service’s own convention (never a config file of our own).

  • ensure() — initialise once, idempotently; raise CredentialError with the setup text before any data request.

  • env() — context manager yielding the GDAL / HTTP configuration that reads from this service need.

reset() None[source]#

Forget cached initialisation (tests, or after credentials change).

error(message: str | None = None, *, alternatives: tuple[str, ...] = (), cause: str | None = None) CredentialError[source]#

Build the standard CredentialError for this provider.