Let’s use EOReader with Dask.

Note: This is experimental for now, use it at your own risk !

# Imports
import os
from dask.distributed import Client, LocalCluster
from eoreader.reader import Reader
from eoreader.bands import RED
from eoreader.env_vars import USE_DASK

# Ensure EOReader uses dask
os.environ[USE_DASK] = "1"

# Create local cluster
with LocalCluster(
        n_workers=4, threads_per_worker=4, processes=True
) as cluster, Client(cluster):
    # Create the reader
    reader = Reader()

    # Open your product
    path = os.path.join("/home", "data", "DATA", "PRODS", "LANDSATS_COL2",
    prod = reader.open(path, remove_tmp=True)

    # Load this band
    band_dict = prod.load(RED)

# Plot band
band_dict[RED][:, ::10, ::10].plot()
<matplotlib.collections.QuadMesh at 0x7f113fb53bb0>