Develop for XenServer

Getting Started with Python

The XenServer-SDK directory contains the following folders that are relevant to Python developers:

  • XenServerPython: This directory contains the XenServer Python module XenAPI.py.

Python support:

  • The Citrix Hypervisor 8.2 Cumulative Update 1 SDK supports Python 2 and Python 3.
  • The XenServer 8 SDK (version 24.32.0 and later) supports only Python 3.

Alternative installation

The Python module is also available as a package on PyPi. To install the package, enable the virtual environment where it will be used and run

pip install XenAPI

RPC protocol

The Python module supports the XML-RPC protocol.

Platform supported

  • Linux
  • Windows

Library

  • XenAPI.py

Dependencies

  • xmlrpclib

Examples

Examples on the usage of the XenServer Powershell module can be found at XenAPI.py usage examples on GitHub.

Getting Started with Python