Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Helper library for interfacing with xo-server.

Project description


This is a simple helper Python 2 & 3 package to interface with the JSON-RPC over WebSockets API of XenOrchestra’s xo-server.


from xolib import xo, XoError, XoApiError, XoTimeoutError
from __future__ import print_function

xo_instance = xo('ws://localhost', timeout=30)
  xo.session_signInWithPassword(email='lala', password='test')
except XoError:
  print('Wrong password?')

try:'somemethod', somemethod_arg1=arg1, somemethod_arg2=arg2)
except XoTimeoutError:
  print('xo-server did not respond within 30 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.

Files for xolib, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size xolib-0.2.3.tar.gz (2.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page