In [1]:
import xmlrpclib
import ssl
In [2]:
context = ssl._create_default_https_context()
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
In [3]:
url = "https://localhost:5000"
#url = "https://localhost:8443"
In [4]:
twitcher = xmlrpclib.ServerProxy(url, context=context)
In [5]:
twitcher.clear_services()
Out[5]:
In [6]:
twitcher.list_services()
Out[6]:
In [7]:
twitcher.generate_token(1, {})
Out[7]:
In [10]:
twitcher.register_service("http://localhost:8094/wps",
{'name': "emu", 'type': "WPS", 'public': False},
False)
Out[10]:
In [11]:
twitcher.list_services()
Out[11]:
In [12]:
twitcher.unregister_service('emu')
Out[12]:
In [13]:
twitcher.list_services()
Out[13]:
In [ ]: