Python driver

This driver make use of the internal API. Unless you have specific requirements, we suggest to move to the EC2 API and the corresponding driver.

Apache Libcloud ( driver will allow you to interact with snooze from a python script.

You need the code of the apache-libcloud project :

git clone
git checkout 0.12.1

Next, install the specific files for Snooze driver from :

You need to add three files :


Use it

You can copy/paste the following code in the python interpreter or in a script file.

  • First you need to import the requires libraries.
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
  • Next, connect to the driver. Depending on your configuration pass one bootstrap address to the driver, here we assume that a bootstrap is listenning on
Snooze = get_driver(Provider.SNOOZE)
driver = Snooze("","5000")

Now you are ready to create a virtual machine and check its state.

n1 = driver.create_node(libvirt_templates=["vmtemplate.xml"], tx=12800, rx=12800)
print "VM %s status %s"%(,n1.state)

Table Of Contents

Previous topic

Developper Guide

Next topic

Internal API Reference