Skip to main content
Help the Python Software Foundation raise $60,000 USD by December 31st!  Building the PSF Q4 Fundraiser

Wrapper for civo api

Project description

Civo

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

Usage

>>> from civo import Civo
>>> from os.path import expanduser
​
>>> civo = Civo('token')
>>> home = expanduser("~/.ssh/")
>>> ssh_file = open('{}id_dsa.pub'.format(home)).read()
​
>>> # you can filter the result
>>> size_id = civo.size.search(filter_by='name:g2.xsmall')[0]['name']
>>> template = civo.templates.search(filter_by='code:debian-stretch')[0]['id']
​
>>> civo.ssh.create(name='default', public_key=ssh_file)
>>> ssh_id = civo.ssh.search(filter_by='name:default')[0]['id']
>>> civo.instances.create(hostname='text.example.com', size=size_id,
                      region='lon1', template_id=template,
                      public_ip='true', ssh_key=ssh_id)

Installation

pip3 install civo

Requirements

requests

Compatibility

python 3.7

Licence

Mit License

Authors

civo was written by Alejandro JNM.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for civo, version 1.0.7
Filename, size File type Python version Upload date Hashes
Filename, size civo-1.0.7-py3-none-any.whl (21.9 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size civo-1.0.7.tar.gz (14.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page