Download Copernicus Data Space products with the Tilebox Copernicus storage client, using Sentinel-2 as an example.
Use this guide when you already have a Copernicus datapoint from a Tilebox metadata query and want to access the product files behind it. The example uses Sentinel-2 Level-2A data, but the same storage client pattern applies to Copernicus products supported by Tilebox.Tilebox indexes product metadata as datasets. Product files remain in the Copernicus Data Space Ecosystem, so file access uses the CopernicusStorageClient with Copernicus S3 credentials.
Start with a small metadata query and select one datapoint to access. For a deeper guide to open data discovery and metadata filtering, see Query open data metadata.
Use download when you need the complete Sentinel-2 product directory. The storage client resolves the product location from the Tilebox datapoint metadata and downloads the matching files into the local cache directory.
Python
product_path = storage.download(selected)print(f"Downloaded {product_path.name} to {product_path}")print("Contents:")for path in product_path.iterdir(): print(f"- {path.relative_to(product_path)}")
Sentinel-2 products contain many files, including metadata, masks, quicklook images, and bands at different resolutions. Use list_objects and download_objects when you only need specific files.
Python
objects = storage.list_objects(selected)wanted_bands = ["B02_10m", "B03_10m", "B04_10m", "B08_10m"]band_objects = [ obj for obj in objects if any(band in obj for band in wanted_bands)]for obj in band_objects: print(obj)downloaded_files = storage.download_objects(selected, band_objects)print(downloaded_files)
Use this pattern when a workflow only needs a few bands or metadata files. It reduces transfer time and local storage compared with downloading the full .SAFE product.
Many Copernicus products include a quicklook image. In a notebook, use quicklook to display the product preview without downloading the full product first.