Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Installation

rle-python requires Python 3.11 or 3.12 (>=3.11,<3.13).

From PyPI

pip install rle-python            # local files
pip install rle-python[gcs]       # + gs:// GeoParquet (gcsfs)
pip install rle-python[aws]       # + s3:// GeoParquet (s3fs)
pip install rle-python[viz]       # + interactive maps (lonboard) / static fallback (matplotlib)

The extras are additive — combine them as needed, e.g. pip install rle-python[gcs,viz].

ExtraAddsEnables
gcsgcsfsReading/writing GeoParquet on gs://
awss3fsReading GeoParquet on s3://
vizlonboard, matplotlibto_map() / to_layer() interactive maps and the static-image fallback

The core install already pulls in the geospatial stack (geopandas, shapely, rasterio, rioxarray, rasterstats, pyproj, pyarrow, fsspec) so local vector, GeoParquet, and COG workflows work out of the box.

From GitHub

To install an unreleased version straight from the repository:

pip install "rle-python @ git+https://github.com/RLE-Assessment/rle-python"

Extras work the same way, e.g. pip install "rle-python[viz] @ git+https://github.com/RLE-Assessment/rle-python".

With uv

uv is a fast Python package manager. Add rle-python to a project (writes it to your pyproject.toml):

uv add rle-python
uv add "rle-python[gcs,viz]"        # with extras

To install into the current environment without touching project files:

uv pip install rle-python

Install from GitHub via uv:

uv add "rle-python @ git+https://github.com/RLE-Assessment/rle-python"

As a script dependency

rle-python can be declared as an inline dependency of a single-file script using PEP 723 metadata. A runner such as uv run reads the # /// script block, provisions an isolated environment, and executes the file — no separate install step:

# /// script
# requires-python = ">=3.11"
# dependencies = ["rle-python @ git+https://github.com/RLE-Assessment/rle-python"]
# ///

from rle.core import list_backends

print("rle backends:", list_backends())

Run it with:

uv run script.py

Earth Engine support

Earth Engine backends are not part of rle-python. They ship in the optional companion distribution rle-python-gee, which installs into the same rle namespace under rle.gee:

pip install rle-python-gee        # Google Earth Engine backends -> rle.gee
from rle.gee import GeeEcosystems
eco = GeeEcosystems("projects/my-project/assets/ecosystems")

List the backends available in your environment with the CLI:

rle backends

See CLI & backends for details on the backend registry.

Verify the install

rle --version