File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,23 @@ pip install python-vaultwarden
3636``` python
3737from vaultwarden.clients.vaultwarden import VaultwardenAdminClient
3838
39- client = VaultwardenAdminClient(url = " https://vaultwarden.example.com" , admin_secret_token = " admin_token" )
39+ client = VaultwardenAdminClient(url = " https://vaultwarden.example.com" , admin_secret_token = " admin_token" , preload_users = True )
4040
4141client.invite(" john.doe@example.com" )
4242
43- all_users = client.get_all_users()
43+ # Get all users
44+ all_users = client.users()
4445
45- client.delete(all_users[0 ].id)
46+ # Get a specific user by email
47+ user = client.user(email = " example@example.com" )
4648
49+ # Delete/Disable/Enable a user by ID
50+ client.delete(user.Id)
51+ client.disable(user.Id)
52+ client.enable(user.Id)
53+
54+ # Set enabled status of a user
55+ client.set_user_enabled(user.Id, enabled = True )
4756```
4857
4958### Bitwarden client
You can’t perform that action at this time.
0 commit comments