feat(python): expose get_me, get_client, get_clients #4020
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.43) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 388 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.357
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #4020"
general
weight: 0.35
yummyPancake2607
Add system client methods to the Python SDK for parity with Rust SDK:
Which issue does this PR address?
<!--
We generally require a GitHub issue for all bug fixes and enhancements. Link it with GitHub syntax, keep the line that applies and delete the other:
Closes #123auto-closes the issue when this PR merges (full fix).Relates to #123links without closing (partial or related work).-->
Relates to #4015
Rationale
<!--
Why is this change needed? If the issue explains it well, a one-liner is fine.
-->
The Rust SDK exposes
get_me,get_client, andget_clientsviaSystemClient, but the Python SDK had none of them. Every other SDK (Java, .NET, Go, etc.) already exposes connection state — this closes the parity gap.What changed?
<!--
2-4 sentences. Problem first (before), then solution (after).
GOOD:
"Messages were unavailable when background message_saver committed the
journal and started async disk I/O before completion. Polling during
this window found neither journal nor disk data.
The fix freezes journal batches in the in-flight buffer before async persist."
GOOD:
"When many small messages accumulate in the journal, the flush passes
thousands of IO vectors to writev(), exceeding IOV_MAX (1024 on Linux)."
BAD:
-->
The Python SDK had no way to inspect the currently connected client or enumerate all connected clients, while every other SDK could. This adds three methods (
get_me,get_client,get_clients) and their associated wrapper types (ClientInfo,ClientInfoDetails,ConsumerGroupInfo) to the Python SDK, following the same pattern used for user types inuser.rs.Local Execution
cargo check,cargo clippy --all-features --all-targets -- -D warnings,cargo fmt --all -- --check<!--
You must run your code locally before submitting.
"Relying on CI" is not acceptable - PRs from authors who haven't run the code will be closed.
Did you have
prekinstalled? It runs automatically on commit and covers all project languages. See CONTRIBUTING.md.-->
AI Usage
<!--
If AI tools were used, please answer:
1. Which tools? (e.g., GitHub Copilot, Claude, ChatGPT)
2. Scope of usage? (e.g., autocomplete, generated functions, entire implementation)
3. How did you verify the generated code works correctly?
4. Can you explain every line of the code if asked?
If no AI tools were used, write "None" or delete this section.
-->
None