Upload the collection¶
Command line interface (CLI)¶
In the theia-dumper
CLI, 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:
In case he has an item, or an item collection, he can use the same command:
For more details, see this page.
Python¶
Another way is to use the python API:
from theia_dumper.stac import TransactionsHandler
handler = TransactionsHandler(
stac_endpoint="https://stacapi-cdos.apps.okd.crocc.meso.umontpellier.fr",
storage_endpoint="https://s3-data.meso.umontpellier.fr",
storage_bucket="sm1-gdc/some-path",
assets_overwrite=True
)
handler.load_and_publish("/tmp/collection.json")