Skip to content

Latest commit

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

XoLib

Overview

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

Usage

from xolib import xo, XoError, XoApiError, XoTimeoutError
from __future__ import print_function
xo_instance = xo('ws://localhost', timeout=30)
try:
xo.session_signInWithPassword(email='lala', password='test')
except XoError:
print('Wrong password?')
try:
xo.call('somemethod', somemethod_arg1=arg1, somemethod_arg2=arg2)
except XoTimeoutError:
print('xo-server did not respond within 30 seconds.')
except XoApiError:
print('Fix your arguments.')

About

Python library to interface with XenOrchestra.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages