Description
The Rust client can report the currently connected client and enumerate all connected clients (core/common/src/traits/system_client.rs). The Python SDK exposes none of it, so a Python operator cannot see connection state that every other SDK can. Part of the parity work tracked in #3893.
async fn get_me(&self) -> Result<ClientInfoDetails, IggyError>;
async fn get_client(&self, client_id: u32) -> Result<Option<ClientInfoDetails>, IggyError>;
async fn get_clients(&self) -> Result<Vec<ClientInfo>, IggyError>;
get_client and get_clients require permission to read server info; get_me requires authentication only.
Affected area / component
Python SDK
Proposed solution
- Add
foreign/python/src/client_info.rs wrapping ClientInfo and ClientInfoDetails, following src/user.rs (pyclass + From conversions + gen_stub_pyclass), and register it in src/lib.rs.
- Add the three methods to
src/client.rs. get_client returns None when the id is unknown rather than raising.
- Add the stub entries to
foreign/python/apache_iggy.pyi.
- Add
foreign/python/tests/test_client_info.py: assert get_me() returns the connected client, that its id appears in get_clients(), and that get_client() on an unknown id returns None.
Alternatives considered
No response
Contribution
Good first issue
Description
The Rust client can report the currently connected client and enumerate all connected clients (
core/common/src/traits/system_client.rs). The Python SDK exposes none of it, so a Python operator cannot see connection state that every other SDK can. Part of the parity work tracked in #3893.get_clientandget_clientsrequire permission to read server info;get_merequires authentication only.Affected area / component
Python SDK
Proposed solution
foreign/python/src/client_info.rswrappingClientInfoandClientInfoDetails, followingsrc/user.rs(pyclass +Fromconversions +gen_stub_pyclass), and register it insrc/lib.rs.src/client.rs.get_clientreturnsNonewhen the id is unknown rather than raising.foreign/python/apache_iggy.pyi.foreign/python/tests/test_client_info.py: assertget_me()returns the connected client, that its id appears inget_clients(), and thatget_client()on an unknown id returnsNone.Alternatives considered
No response
Contribution
Good first issue