|
- from xmlrpc import client
-
- server_url = 'http://localhost:9999'
- db_name = 'library_13'
- username = 'admin'
- password = 'admin162534!'
-
- common = client.ServerProxy('%s/xmlrpc/2/common' % server_url)
- user_id = common.authenticate(db_name, username, password, {})
-
- if user_id:
- print("Success: User id is", user_id)
- else:
- print("Failed: wrong credentials")
|