Helper library for interfacing with xo-server.
Project description
Overview
This is a simple helper Python 2 & 3 package to interface with the JSON-RPC over WebSockets API of XenOrchestra’s xo-server.
Usage
from xolib import xo, XoError, XoApiError, XoTimeoutError from __future__ import print_function xo_instance = xo(ws://localhost) try: xo.signIn_withPassword(username='lala', password='test') except XoError: print('Wrong password?') try: xo.call('somemethod', timeout=20, somemethod_arg1=arg1, somemethod_arg2=arg2) except XoTimeoutError: print('xo-server did not respond within 20 seconds.') except XoApiError: print('Fix your arguments.')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
xolib-0.1.0.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for xolib-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32f943dcb8ca55db344fc092880d48dec08ef89c90aaf896a249143b523b062b |
|
MD5 | fc00fdf899e001e396f70a2ff302a05d |
|
BLAKE2b-256 | 8ca673881e7c0d34847898b1c068991a7ac717bb7cf3d3a58f7af00e37b576d2 |