Skip to main content

Storage client for Tilebox

Project description

Tilebox Logo

Documentation | Console | Example Gallery

Tilebox Storage

Download satellite payload data for your Tilebox datasets.

Quickstart

Install using pip:

pip install tilebox-storage tilebox-datasets

Fetch a datapoint to download the payload data for:

from tilebox.datasets import Client


# Creating clients
client = Client(token="YOUR_TILEBOX_API_KEY")
datasets = client.datasets()

# Choosing the dataset and collection
s2_dataset = datasets.open_data.copernicus.sentinel2_msi
collections = s2_dataset.collections()
collection = collections["S2A_S2MSI2A"]

# Loading metadata
s2_data = collection.load(("2024-08-01", "2024-08-02"), show_progress=True)

# Let's download the first granule
s2_granule = s2_data.isel(time=0)

Then download the payload data using a storage client:

from pathlib import Path
from tilebox.storage import CopernicusStorageClient

# Check out the Copernicus Dataspace S3 documentation at
# https://documentation.dataspace.copernicus.eu/APIs/S3.html
# to learn how to get your access key and secret access key
storage_client = CopernicusStorageClient(
    access_key="YOUR_ACCESS_KEY",
    secret_access_key="YOUR_SECRET_ACCESS_KEY",
    cache_directory=Path("./data")
)

downloaded_data = storage_client.download(s2_granule)

print(f"Downloaded granule: {downloaded_data.name} to {downloaded_data}")
print("Contents: ")
for content in downloaded_data.iterdir():
    print(f" - {content.relative_to(downloaded_data)}")

License

Distributed under the MIT License (The MIT License).

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

tilebox_storage-0.37.1.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tilebox_storage-0.37.1-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file tilebox_storage-0.37.1.tar.gz.

File metadata

  • Download URL: tilebox_storage-0.37.1.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tilebox_storage-0.37.1.tar.gz
Algorithm Hash digest
SHA256 5bc0c553fb28b71c92a1d653c0ddbbc52dbb97cd14d03a10bade4cfcc453fec6
MD5 f48090bd1aeee781a1c24853535ec289
BLAKE2b-256 92f6a5a65d0371fa22303fd9a8bad35403ecda290b781d01daf1fdc7b31a759a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tilebox_storage-0.37.1.tar.gz:

Publisher: publish_tilebox_storage.yml on tilebox/tilebox-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tilebox_storage-0.37.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tilebox_storage-0.37.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2264228e9e19add27821b1272d5a9c081ef37a9b1e5d1f2fec260d24f467e20c
MD5 b74ecce9f8d18622cc95de166b4a7be4
BLAKE2b-256 95dc4eeedebfefc4c617e6dfad718de7e9df8d19fec5b20e845db766fbce4e87

See more details on using hashes here.

Provenance

The following attestation bundles were made for tilebox_storage-0.37.1-py3-none-any.whl:

Publisher: publish_tilebox_storage.yml on tilebox/tilebox-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page