# -*- coding: utf-8 -*- from xmlrpc.client import ServerProxy is_local = 0 if is_local: url = 'http://127.0.0.1:28888' else: url = 'http://192.168.31.41:32000' username = 'rpc' password = 'aaaAAA111' db = "quantify" common = ServerProxy(f"{url}/xmlrpc/2/common") uid = common.authenticate(db, username, password, {}) print(uid)