python(refactor): group access control APIs under client.access_control#666
Conversation
|
Python docs preview: https://sift-stack.github.io/sift/python/pr-666/ Deployed from |
…ccess-control-client-surface-under-a-single
…lient.users resource
alexluck-sift
left a comment
There was a problem hiding this comment.
Re-reviewed after the latest round. All my earlier feedback is addressed, and I ran a full audit of the current surface: the touched-area unit tests (151) pass, and mypy and pyright are clean. Sync/async parity, exports, and client wiring all check out. Overall the PR is in strong shape.
Two items with real user impact are inline as requested changes (both small). The rest are non-blocking and prefixed as such.
One extra note, non-blocking, on test coverage: the suite passes but a few branches are unexercised. A NUMBER key given a bool, a SET_OF_ENUM key given a scalar, the falsy numeric value 0 (only 5 is tested), the modified_after filter, and an assertion that UNSPECIFIED stays out of the public enums. Cheap to add and they guard real edges.
Bump version to 0.19.0 and update the changelog for the PRs merged since v0.18.0: ABAC attributes (#646), get_data cache improvements (#650), pytest docstring cleaning (#658), ULog data imports (#663), access control API grouping (#666), report templates (#672), download_file extra headers (#677), and the get_data pagination fix plus progress bars (#678). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Y5U49rrpvQm5bPbvEjR4xr
Summary
Groups access-control APIs under:
This keeps resource and principal attributes together under one access-control surface, with room for future APIs.
access_controlnamespaces.client.access_control.assign()accepts key objects or key IDs.ResourceAttributeEntity.USERprincipals.Example
Validation