earthdaily / earthdaily-python-client

EarthDaily python client
https://earthdaily.github.io/earthdaily-python-client/
MIT License
11 stars 6 forks source link

Document required credentials #5

Closed robmarkcole closed 10 months ago

robmarkcole commented 11 months ago

Running python examples/summary_stack.py I get

AttributeError: You need to hav env : EDS_AUTH_URL, EDS_SECRET and EDS_CLIENT_ID

I recommend using dotenv for managing these, allows providing a template that can be edited and gitignored

With dotenv installed, user creates a .env file with contents:

EDS_AUTH_URL="https://.."
EDS_CLIENT_ID="123"
EDS_SECRET="123"

Then in the script we add:

from dotenv import load_dotenv

load_dotenv()  # take environment variables from .env.

Validated

robmarkcole commented 10 months ago

The changes from https://github.com/GEOSYS/earthdaily-python-client/pull/8 also snuck in on my branch