openeo-python-client icon indicating copy to clipboard operation
openeo-python-client copied to clipboard

feature: artifact-helper

Open pvbouwel opened this issue 10 months ago • 0 comments

Allow uploading artifacts using:

from openeo.extra.artifacts import ArtifactHelper

artifact_helper = ArtifactHelper.from_openeo_connection(connection)
storage_uri = artifact_helper.upload_file(object_name, src_file_path)
presigned_uri = artifact_helper.get_presigned_url(storage_uri)

Where object_name is a logical string name that will be used to give a unique name in the backend storage. And src_file_path points to a local file that needs to be stored remotely.

This MVP version still has the sts and s3 URIs hard coded. This is temporary. It is possible to expand the links that are exposed at the root_url (https://openeo.dataspace.copernicus.eu/openeo/1.2/) to include rels like 'artifacts-s3-endpoint' and 'artifacts-sts-endpoint'. That way different artifact backends can be chosen based on the OpenEO environment.

pvbouwel avatar Mar 13 '25 14:03 pvbouwel