Description
The Python SDK currently has no user management capability beyond login_user. Comparing the Rust SDK client traits (core/common/src/traits/user_client.rs) against the PyO3 bindings in foreign/python/src/client.rs, the entire rest of the UserClient surface is unexposed: there is no way to list, inspect, create, update, or delete users from Python.
This blocks any Python application that needs to provision users programmatically (e.g. setting up service accounts in deployment scripts) — today that requires dropping down to the CLI or another SDK.
Affected area / component
Python SDK
Proposed solution
Add the CRUD subset as async methods on IggyClient, wrapping the corresponding Rust SDK functions with PyO3, consistent with how the existing topic and consumer group methods are exposed:
get_user(user_id) / get_users()
create_user(username, password, status)
update_user(user_id, username=None, status=None)
delete_user(user_id)
This also means exposing UserInfo, UserInfoDetails, and the UserStatus enum as Python classes.
Scope cut: create_user takes permissions: Option<Permissions> on the Rust side. Permissions is a nested structure that deserves its own type mapping, so this issue always passes None and leaves the parameter unexposed. I'll handle Permissions (together with update_permissions, change_password, and logout_user) in a follow-up issue.
Deliverables: implementation, e2e tests in foreign/python/tests/test_user.py, regenerated apache_iggy.pyi stubs, all pre-commit hooks passing.
Alternatives considered
No response
Contribution
Good first issue
Description
The Python SDK currently has no user management capability beyond
login_user. Comparing the Rust SDK client traits (core/common/src/traits/user_client.rs) against the PyO3 bindings inforeign/python/src/client.rs, the entire rest of theUserClientsurface is unexposed: there is no way to list, inspect, create, update, or delete users from Python.This blocks any Python application that needs to provision users programmatically (e.g. setting up service accounts in deployment scripts) — today that requires dropping down to the CLI or another SDK.
Affected area / component
Python SDK
Proposed solution
Add the CRUD subset as async methods on
IggyClient, wrapping the corresponding Rust SDK functions with PyO3, consistent with how the existing topic and consumer group methods are exposed:get_user(user_id)/get_users()create_user(username, password, status)update_user(user_id, username=None, status=None)delete_user(user_id)This also means exposing
UserInfo,UserInfoDetails, and theUserStatusenum as Python classes.Scope cut:
create_usertakespermissions: Option<Permissions>on the Rust side.Permissionsis a nested structure that deserves its own type mapping, so this issue always passesNoneand leaves the parameter unexposed. I'll handlePermissions(together withupdate_permissions,change_password, andlogout_user) in a follow-up issue.Deliverables: implementation, e2e tests in
foreign/python/tests/test_user.py, regeneratedapache_iggy.pyistubs, all pre-commit hooks passing.Alternatives considered
No response
Contribution
Good first issue