Chameleon Cloud Python API

python-chi is a Python library that can help you interact with the Chameleon testbed to improve your workflows with automation. It additionally pairs well with environments like Jupyter Notebooks.

pip install python-chi


Environment variables are the primary authentication method. Please refer to the documentation on OpenRC scripts to learn more about how to download and source your authentication credentials for the CLI; the same instructions apply for using the Python interface.

Basic usage

The following example shows how to make a reservation for a bare metal server. For more details about the modules available refer to their respective pages.

import chi

# Select your project
chi.set('project_name', 'CH-XXXXXX')
# Select your site

# Make a reservation ...
reservations = []
# ... for one node of type "compute_skylake"
    reservations, node_type='compute_skylake', count=1)
# ... and one Floating IP
# ... for one day.
start_date, end_date =
    lease_name, reservations, start_date=start_date, end_date=end_date)

Indices and tables