Skip to content

python(feat): add artifacts resource - #845

Merged
alexluck-sift merged 4 commits into
mainfrom
al/feat/sift-client-artifacts-resource
Oct 20, 2026
Merged

alexluck-sift merged 4 commits into
mainfrom
al/feat/sift-client-artifacts-resource

Conversation

@alexluck-sift

@alexluck-sift alexluck-sift commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds client.artifacts and client.async_.artifacts over the public ArtifactService, focused on reading: find artifacts by the runs and assets they link to, browse version history through client.artifacts.versions, and read any version's file to disk or into memory.

  • list_ and versions.list_ take the same filters: titles, IDs, creator, creation time, metadata, and file name, plus link filters that take objects: sources=[run, asset] (SOURCE), derived_from=[artifact] (DERIVED_FROM), and related_to=[...] (any relation). filter_query takes the service's CEL for anything narrower, for example runs.exists(r, r.relation == "SOURCE" && r.name.contains("thermal")).
  • read_bytes returns a version's file in memory; download writes it to a path.
  • Shared change: UploadLowLevelClient.upload_attachment takes its file as source (was path) and now also accepts an open binary file plus file_name. In-repo callers are updated; path uploads behave as before.
  • Links are write-only here: the public API has no call to read them back.

Verification

  • Not yet run against a live server. The two integration-marked tests in _tests/resources/test_artifacts.py cover the end-to-end flow.

@github-actions

github-actions Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Python docs preview: https://sift-stack.github.io/sift/python/pr-845/

Deployed from 93ee4bc. The link may take up to a minute to become live as GitHub Pages propagates.

@alexluck-sift
alexluck-sift force-pushed the al/feat/sift-client-artifacts-resource branch from 049b7cc to d1ed97b Compare October 19, 2026 23:05
@alexluck-sift
alexluck-sift force-pushed the al/feat/sift-client-artifacts-resource branch from d1ed97b to 917a606 Compare October 19, 2026 23:37
@alexluck-sift
alexluck-sift marked this pull request as ready for review October 19, 2026 23:41
@alexluck-sift
alexluck-sift force-pushed the al/feat/sift-client-artifacts-resource branch from 917a606 to 6853bb6 Compare October 19, 2026 23:49
@alexluck-sift
alexluck-sift force-pushed the al/feat/sift-client-artifacts-resource branch 3 times, most recently from c76b74a to 489108e Compare October 20, 2026 00:17
@alexluck-sift
alexluck-sift force-pushed the al/feat/sift-client-artifacts-resource branch from 489108e to a424ec9 Compare October 20, 2026 00:25
Comment thread python/lib/sift_client/sift_types/artifact.py
@wei-sift
wei-sift self-requested a review October 20, 2026 00:44

@wei-sift wei-sift left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm

@alexluck-sift
alexluck-sift merged commit 9415cc2 into main Oct 20, 2026
27 checks passed
@alexluck-sift
alexluck-sift deleted the al/feat/sift-client-artifacts-resource branch October 20, 2026 00:46
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