Skip to main content

Utility functions for Google Earth Engine

Project description

Google Earth Engine (GEE) Utilities

This project provides a few simple utility functions for interacting with GEE.

Authentication

To function properly, this code needs credentials that it can use to authenticate against the Google Earth Engine API. Credentials can be provided in one of two ways, and the code will look for them in this order:

  1. Service Account Key.

Before running this code, create an environment variable named SERVICE_ACCOUNT_KEY containing the JSON key for a Google Cloud service account with the necessary permissions to perform the actions you're trying to perform in GEE.

  1. Personal Credentials.

Before running this code, authenticate with the Google Earth Engine API using the earthengine command line tool:

$ earthengine authenticate

Development

This project uses Pipenv to manage virtual environments and dependencies. Development-time dependencies are documented in the Pipfile. Follow the Pipenv documentation to create a virtual environment and install the dependencies.

Makefile

The included Makefile prescribes actions to test, build, and publish this code to a Python Package Index (PyPI) repository as described in the following sections.

$ make [test | build | publish]

Testing

With the virtual environment active and the dependencies installed, use pytest to run the test suite.

Building

This project uses the setuptools Python package for packaging as described here.

When building via the make build command, you may optionally append to the package name using the prerelease argument. For example, if the current version of geeutils specified in the setup.py module is 1.2.3, then

$ make build prerelease=rc1

will produce a package named geeutils-1.2.3rc1. The default is a beta prerelease name incremented by each git commit (eg/ 1.2.3b7 for the seventh commit on this branch). Specify a final release with

$ make build prerelease=""

Note that prerelease names must comply with PEP 440.

Publishing

This project uses the twine Python package for distribution as described here.

When publishing via the make publish command, the default PyPI repository is testpypi. To publish to pypi.org, specify that repository:

$ make publish pypi_repository=pypi

The credentials necessary to publish to the target PyPI repository can be provided in one of two ways.

  1. As these environment variables:
Env Var Notes
PYPI_REPOSITORY_USERNAME PyPI account username. If authenticating using a token, use the literal string __token__.
PYPI_REPOSITORY_PASSWORD PyPI account password. If authenticating using a token, use the token contents.
  1. At the make publish command:
$ make publish pypi_repository_username="foo" pypi_repository_password="bar"

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

geeutils-0.4.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

geeutils-0.4.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file geeutils-0.4.0.tar.gz.

File metadata

  • Download URL: geeutils-0.4.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.8.2 requests/2.27.1 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.63.1 CPython/3.6.12

File hashes

Hashes for geeutils-0.4.0.tar.gz
Algorithm Hash digest
SHA256 606036d307d523f13ed3b5825d5961f0d04bdc3c234ade22ec44ab04f699ff6f
MD5 1e5f6fb7241d32cb2e9f5f97f32decfb
BLAKE2b-256 054f6cc27cc81a0cfde772d42f4e06d291748cb7707f5b0d5ad6ddb14561eab2

See more details on using hashes here.

File details

Details for the file geeutils-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: geeutils-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.8.2 requests/2.27.1 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.63.1 CPython/3.6.12

File hashes

Hashes for geeutils-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8a60d05c374d519cd128c90eca9c7c606a6498ae75d4d1536b30f39dc407f5fc
MD5 1c17a4df353112e1685fa349f0637bf1
BLAKE2b-256 883570f267ebac05d487d0872afefdf47446e22642fac248f095f7beacd79ee6

See more details on using hashes here.

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