earthdaily documentation


EarthDaily Python Client

Your gateway to the Earth Data Store STAC Catalog.
Who we are

Project description · Report Bug · Request Feature

PyPI version Documentation pytest-main

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Support development
  5. License
  6. Contact
  7. Copyrights

About The Project

In the realm of geospatial data analysis and Earth observation, the EarthDaily Python package emerges as a powerful toolset that seamlessly connects you to the vast and invaluable Stac catalog Earth Data Store. This package is designed with the vision of simplifying and optimizing your workflow, ensuring that you can harness the full potential of Earth observation data with ease and efficiency.

Our package is built upon a foundation of best practices, meticulously crafted to elevate your data analysis experience. With EarthDaily, you can effortlessly navigate the complexities of datacube creation, including crucial processes like conversion to reflectance and automatic clipping to your area of interest. Additionally, we’ve taken care to make EarthDaily fully compatible with Dask, enabling you to scale your data preprocessing tasks with confidence and precision.

Features

See documentation for more information

Getting started

Prerequisites

Make sure you have valid EDS credentials. If you need to get trial access, please contact us.

This package has been tested on Python 3.10, 3.11 and 3.12.

Installation

From pypi, using pip

pip install earthdaily

From repository, using mamba, conda and pip

# Clone the repository and go inside
git clone git@github.com:earthdaily/earthdaily-python-client.git
cd earthdaily-python-client

# Create a virtual environment named earthdaily and install package dependencies
mamba env create -n earthdaily -f requirements.yml
conda activate earthdaily

# Install package in editable mode
pip install -e .

Authentication

In order to generate a credentials file with the right variables and layout, you can use the copy-earthdaily-credentials-template script that is installed along the earthdaily package. It can generate credentials file as JSON, TOML or .env. Generate the credentials file of your liking and edit it to insert your credentials.

From the default credentials file

Create a TOML credentials file in the default location:

  • “$HOME/.earthdaily/credentials” on linux

  • “$USERPROFILE/.earthdaily/credentials” on Windows

copy-earthdaily-credentials-template --default

Edit it to insert your credentials. The following code will automatically find and use the credentials for authentification.

from earthdaily import EarthDataStore
eds = EarthDataStore()

From a JSON file

Authentication credentials can be given as an input JSON file. You can generate a JSON credentials file with the following command:

copy-earthdaily-credentials-template --json "/path/to/the/credentials_file.json"

Edit it to insert your credentials. Then use it as input for authentification:

from pathlib import Path
from earthdaily import EarthDataStore
eds = EarthDataStore(json_path = Path("/path/to/the/credentials_file.json"))

From a TOML file

Authentication credentials can be given as input with a TOML file. You can generate a TOML credentials file with the following command:

copy-earthdaily-credentials-template --toml "/path/to/the/credentials_file"

Edit it to insert your credentials. Then use it as input for authentification:

from pathlib import Path
from earthdaily import EarthDataStore
eds = EarthDataStore(toml_path = Path("/path/to/the/credentials_file"))

From environment variables

Authentication credentials can be automatically parsed from environment variables. As a convenience python-dotenv is supported.

You can generate a .env credentials file with the following command:

copy-earthdaily-credentials-template --env "/path/to/the/.env"

Or you can copy the .env.sample file from the repository and rename it to .env. Edit it to insert your credentials. Then add to your script/notebook:

from dotenv import load_dotenv

load_dotenv()  # take environment variables from .env.

Usage

See the documentation for more information.

Support development

If you find this package useful, please consider supporting its development.

Support development

If this project has been useful, that it helped you or your business to save precious time, don’t hesitate to give it a star.

(back to top)

License

Distributed under the MIT License.

(back to top)

Contact

For any additonal information, please email us.

(back to top)

Copyrights

© EarthDaily | All Rights Reserved.

(back to top)

Examples gallery

Documentation API

Indices and tables