csda-client
csda-client is a Python client for interacting with NASA's Commercial Satellite Data Acquisition (CSDA) APIs.
Quickstart
Install csda-client via pip:
python -m pip install git+https://github.com/NASA-IMPACT/csda-client
Then:
from csda_client import CsdaClient
from httpx import BasicAuth
auth = BasicAuth(username="your-earthdata-username", password="your-earthdata-password")
client = CsdaClient.open(auth)
client.verify()
See our search and download notebook for an example of finding and downloading data from the CSDA system.
Authentication
We use httpx authentication to verify your Earthdata login credentials, which we use for CSDA API access.
You can use BasicAuth as demonstrated above, but we recommend setting up .netrc authentication to avoid putting your password in code.
To set up .netrc:
- Follow the instructions here
-
Provide a
NetrcAuthtoCsdaClient.open:from csda_client import CsdaClient from https import NetrcAuth client = CsdaClient.open(NetrcAuth())