Skip to content

feature: artifact-helper #750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

pvbouwel
Copy link

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.

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)
```
@pvbouwel pvbouwel requested review from soxofaan and jdries March 13, 2025 14:39
Copy link
Member

@soxofaan soxofaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is quite a large diff 😄 and I haven't gone deep yet, but here are some initial notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants