python(feat): add export api for sift client#490
Merged
Conversation
nathan-sift
requested changes
Mar 13, 2026
nathan-sift
previously approved these changes
Mar 17, 2026
Contributor
nathan-sift
left a comment
There was a problem hiding this comment.
This looks good, thanks for the changes! Approving, but it looks like you might need to re-update the stubs
python/lib/sift_client/_internal/_grpc/_async_interceptors/__init__.py
Outdated
Show resolved
Hide resolved
alexluck-sift
requested changes
Mar 18, 2026
edc48f6 to
920e5ca
Compare
…med the file to be more appropriate
…alls off the event loop
…d on the job object itself
…g in test_sync_wrapper
34722e0 to
9a17655
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was changed
Adds a high-level data export API to
sift_clientto reach parity withsift_py(soon to be deprecated).DataExportAPIAsyncwith a singleexport()method that accepts domain objects or raw string IDs for runs, assets, or time-range-based exports and returns aJobhandleJob.wait_and_download()polls until complete, downloads results, and optionally extracts zip files (delegates toJobsAPIAsync)ExportsLowLevelClientwraps gRPC protobuf calls, the high-level client has zero proto imports_internal/util/:channels.py-resolve_calculated_channels()resolves name-based channel identifiers to UUIDs via the channels API (the export API requires UUIDs)file.py-download_file()streams downloads in 4 MiB chunks;extract_zip()extracts and cleans up archivesexecutor.py-run_sync_function()runs blocking calls off the event loop viarun_in_executorclient.data_exportandclient.async_.data_exportVerification