Skip to main content

earthdaily: easy authentication, search and retrieval of Earth Data Store collections data

Project description


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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

earthdaily-0.3.1.tar.gz (50.6 kB view details)

Uploaded Source

File details

Details for the file earthdaily-0.3.1.tar.gz.

File metadata

  • Download URL: earthdaily-0.3.1.tar.gz
  • Upload date:
  • Size: 50.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for earthdaily-0.3.1.tar.gz
Algorithm Hash digest
SHA256 851ebfff5005e0484108291e488b7f7f7e516107401f31af6097a918d000b44c
MD5 7465e1f9469afb8fb5c8214dc3f9f151
BLAKE2b-256 998d50b6c23ab4b2aed12fc6e4aca131806e0701513c22c12a5e55decb629054

See more details on using hashes here.

Provenance

The following attestation bundles were made for earthdaily-0.3.1.tar.gz:

Publisher: publish_pypi_on_tag.yaml on earthdaily/earthdaily-python-client

Attestations:

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page