Skip to content

Upload the collection

First make sure necessary requirements are installed before uploading:

pip install teledetection[upload]

Command line interface (CLI)

In the teledetection CLI, aka tld, the --storage_bucket argument concatenates the actual bucket and the path prefix.

For instance if Jacques wants to upload a collection in sm1-gdc/some-path, he will have to call:

tld publish collection.json --storage_bucket sm1-gdc/some-path

In case he has an item, or an item collection, he can use the same command:

tld publish item.json --storage_bucket sm1-gdc/some-path
tld publish item-collection.json --storage_bucket sm1-gdc/some-path

For more details, see this page.

Python

Another way is to use the python API:

from teledetection.upload.stac import StacUploadTransactionsHandler

handler = StacUploadTransactionsHandler(
    storage_bucket="sm1-gdc/some-path",
    # Values can be customized
)
handler.load_and_publish("/tmp/collection.json")