Wrapper for civo api

civo, civo-api, cloud, python, python-3
pip install civo==1.0.8


Civo python API Library

This project is the python API library for using in python projects.

pip3 install civo

API Library

To use the library in your own python projects you can just add it to the requirements.txt:


Install the package:

pip3 install civo

You need to define CIVO_TOKEN in the environment or when you create a instance of civo you can pass the token as param, also you can change the api endpoint adding to the environment CIVO_API by default we use


  • CIVO only supports IaaS in its SVG1 region
  • The API will default to the NYC1 region, override it with the region option when you create an instance of Civo


from civo import Civo
from os.path import expanduser

civo = Civo('token', region='SVG1')
home = expanduser("~/.ssh/")
ssh_file = open('{}'.format(home)).read()

# you can filter the result
size_id ='name:g2.xsmall')[0]['name']
template ='code:debian-stretch')[0]['id']

civo.ssh.create(name='default', public_key=ssh_file)
ssh_id ='name:default')[0]['id']
civo.instances.create(hostname='', size=size_id, template_id=template, public_ip='true', ssh_key=ssh_id)

Create Kubernetes

Create a new Kubernetes Cluster in the NYC1 DC

from civo import Civo

civo = Civo('token', region='NYC1')
civo.kubernetes.create(name='my_cluster', num_nodes=2)

The API library consists of a handful of classes that implement the Civo API. There is full documentation on the API available at