For the complete documentation index, see llms.txt. This page is also available as Markdown.
Get Started with the Python API
Prerequisites
An Earthscale account. Please reach out to support@earthscale.ai in case you do not have one.
Permissions to access the data you want to visualize. Please refer to the Set up data access section.
Install the Earthscale Package
To use the Python API, first install the earthscale package:
uv add earthscale
poetry add earthscale
pip install earthscale
We recommend using a virtual environment to install the earthscale package as it will help you manage dependencies and avoid conflicts with other packages.
We currently do not provide a conda package. However, you can install earthscale within a conda environment using pip.
conda install pip
pip install earthscale
We currently require a minimum Python version of 3.10 and try to keep dependencies minimal to avoid conflicts with your environments.
Authenticating
To use the Python client, you'll need to authenticate. There are two options:
1. Using environment variables
For accounts with a username and password, set the following environment variables:
This is helpful for using Earthscale in automated pipelines. You can inject the credentials into your pipelines using a secret manager like Vault.
2. Login via Browser
If you use "Continue with Google" to log into Earthscale, you can use the earthscale authenticate CLI command or let the client handle authentication automatically.
Adding a GeoTIFF Dataset
Output
You can use the URL returned by the dataset.dynamic_tile_server.tile_url to integrate the tile server into your own application. Make sure you set the min and max zoom range as returned from this response in your map rendering library.