Skip to main content

eeUtil

Wrapper for easier data management with Earth Engine python sdk

Requires account with access to Google Cloud Storage and Earth Engine.

import eeUtil

# initialize from environment variables
eeUtil.init(project='my-project', bucket='my-bucket')

# create image collection
eeUtil.createFolder('mycollection', imageCollection=True)

# upload image to collection
eeUtil.uploadAsset('image.tif', 'mycollection/myasset')
eeUtil.setAcl('mycollection', 'public')
eeUtil.ls('mycollection')

# export image to cloud storage and download
eeUtil.downloadAsset('mycollection/myasset')

Install

pip install eeUtil

Develop

git clone https://github.com/fgassert/eeUtil.git
cd eeUtil
pip install -e .

Nice things?

  • More consistent python bindings
  • Adds recursive copy, move, remove, setAcl, createFolder.
  • GEE paths not starting with /, users/ projects/ are relative to your user root folder (users/<username> or projects/<project-id>/assets)
  • upload and download stage files via Google Cloud Storage so you don't have to.

Usage

The easiest way to authorize eeUtil is using service account credentials. Once you create a service account and download your credentials.json set these in your environment.

export GOOGLE_APPLICATION_CREDENTIALS=path/to/credentials.json

Initalize these credentials by calling eeUtil.init().

eeUtil.init()

If you don't provide credentials to eeUtil.init(), it defaults to reading from credentials from the environment, and attempts to read credentials as saved by earthengine authenticate for Earth Engine and gcloud auth application-default login for Google Cloud Storage.

eeUtil.init(service_account=GEE_SERVICE_ACCOUNT, 
            credential_path=GOOGLE_APPLICATION_CREDENTIALS, 
            project=GEE_PROJECT, 
            bucket=GEE_STAGING_BUCKET, 
            credential_json=GEE_JSON)
  • service_account Service account name. For more information on GEE service accounts, see: https://developers.google.com/earth-engine/service_account [default: GEE_SERVICE_ACCOUNT]
  • credential_path Path to json file containing private key. This or credential_json is required for service accounts. [default: GOOGLE_APPLICATION_CREDENTIALS]
  • project Project to use for GEE and GCS bucket. [default: GEE_PROJECT or CLOUDSDK_CORE_PROJECT]
  • bucket Storage bucket for staging assets for ingestion. Will create new bucket if none provided. [default: GEE_STAGING_BUCKET]
  • credential_json Pass json string as alternative to credential_path. [default: GEE_JSON]

Metadata

Release files for eeUtil 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eeUtil 0.3.0
File Size Uploaded
eeUtil-0.3.0.tar.gz 13.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eeUtil 0.3.0
File Interpreter ABI Platform
eeUtil-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.5 kB

Release files / eeUtil-0.3.0.tar.gz

Download URL eeUtil-0.3.0.tar.gz
Size 13.6 kB
Tags Source
SHA-256 checksum
How to use checksums
3fa32b342779a084643f44e552bcb59e5fbf8f8d1f711e026ecfc04ed483b560
BLAKE2b-256 checksum
How to use checksums
e52d307ee398380f9b4ea19553a38b1985ae9279160e1eff161a28763a5c94dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.5

Release files / eeUtil-0.3.0-py3-none-any.whl

Download URL eeUtil-0.3.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
acaeb8242acd9d2e88fb9efe6a0082badc0261e1a662be87d391b2254ba6a40d
BLAKE2b-256 checksum
How to use checksums
6132eaefb81130cc401be45545577821171491368f99580b15b8d75f1bf53315
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/57.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page