Skip to content

feat(python): expose get_me, get_client, get_clients - #4020

Open
yummyPancake2607 wants to merge 7 commits into
apache:masterfrom
yummyPancake2607:feat/python-sdk-get-me-client-clients
Open

feat(python): expose get_me, get_client, get_clients#4020
yummyPancake2607 wants to merge 7 commits into
apache:masterfrom
yummyPancake2607:feat/python-sdk-get-me-client-clients

Conversation

@yummyPancake2607

Copy link
Copy Markdown

Add system client methods to the Python SDK for parity with Rust SDK:

  • Add client_info.rs wrapping ClientInfo, ClientInfoDetails, ConsumerGroupInfo types with pyclass getters
  • Add get_me() -> ClientInfoDetails for current client info
  • Add get_client(client_id) -> ClientInfoDetails | None
  • Add get_clients() -> list[ClientInfo] for all connected clients
  • Register new types in lib.rs pymodule
  • Add iggy_common dependency for ClientInfo/ConsumerGroupInfo
  • Add integration tests for all three methods

Which issue does this PR address?

Relates to #4015

Rationale

The Rust SDK exposes get_me, get_client, and get_clients via SystemClient, 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?

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 in user.rs.

Local Execution

  • Passed: cargo check, cargo clippy --all-features --all-targets -- -D warnings, cargo fmt --all -- --check
  • Pre-commit hooks ran / not ran

AI Usage

None

Add system client methods to the Python SDK for parity with Rust SDK:

- Add client_info.rs wrapping ClientInfo, ClientInfoDetails,
  ConsumerGroupInfo types with pyclass getters
- Add get_me() -> ClientInfoDetails for current client info
- Add get_client(client_id) -> ClientInfoDetails | None
- Add get_clients() -> list[ClientInfo] for all connected clients
- Register new types in lib.rs pymodule
- Add iggy_common dependency for ClientInfo/ConsumerGroupInfo
- Add integration tests for all three methods
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

Thanks for the PR. It is labeled S-waiting-on-review and queued for review.

Slash commands (own line, regular comment) move it around the queue:

  • /ready - back to S-waiting-on-review after addressing feedback
  • /author - flip to S-waiting-on-author while you finish changes
  • /request-review @user-or-team - request a reviewer

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Sep 1, 2026
@yummyPancake2607 yummyPancake2607 changed the title feat(python-sdk): expose get_me, get_client, get_clients feat(python): expose get_me, get_client, get_clients Sep 1, 2026
@slbotbm

slbotbm commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@yummyPancake2607 the ci is failing. could you please check?

@hubcio

hubcio commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

why didn't you run precommit hooks? please read CONTRIBUTING.md

- Regenerate apache_iggy.pyi with ClientInfo, ClientInfoDetails,
  ConsumerGroupInfo classes and get_me/get_client/get_clients methods
- Fix ruff lint/format issues in test_client_info.py
@yummyPancake2607

Copy link
Copy Markdown
Author

@hubcio, my bad. I will run it all. Sorry for the earlier work. I will fix it.

@yummyPancake2607

Copy link
Copy Markdown
Author

i have updated the PR accordingly please check. @slbotbm

@slbotbm

slbotbm commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

@yummyPancake2607 the CI is still failing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review PR is waiting on a reviewer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants