Skip to content
This repository has been archived by the owner on Dec 31, 2019. It is now read-only.

cyclone-project/SlipStreamPythonAPI

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SlipStreamPythonAPI

Python wrapper of the SlipStream API

Installation

$ pip install slipstream-api

Usage

$ python

from slipstream.api import Api

api = Api('https://nuv.la')

# Login with username & password
api.login_internal('username', 'password')
# or
# Login with api-key & secret
api.login_apikey('credential/uuid', 'secret')

# List available applications from the App Store
api.list_applications()

# Deploy an application and get it's deployment ID
deployment_id = api.deploy('apps/WordPress/wordpress', cloud='exoscale-ch-gva')

# Terminate the deployment started above
api.terminate(deployment_id)

# Logout
api.logout()

Contribute

$ sh

git clone https://github.com/slipstream/SlipStreamPythonAPI.git
cd SlipStreamPythonAPI/
pip install --editable .

Documentation

Simple docstring based documentation

You can get the full documentation by typing: Python shell/code

from slipstream.api import Api
help(Api)

Shell

pydoc slipstream.api.Api

Or for a specific function: Python shell/code

from slipstream.api import Api
help(Api.deploy)

Shell

pydoc slipstream.api.Api.deploy

Or to get only the docstring: Python shell/code

from slipstream.api import Api
print Api.deploy.__doc__

Currently there is no HTML version of the documentation, only docstring inside the code but the documentation can be generated by the user. To run a local webserver with the documentation you can run:

pydoc -p 8080 slipstream.api.Api

and then http://localhost/slipstream.api.api.html#Api

Sphinx documentation

There is a Sphinx documentation available at http://slipstream.github.io/SlipStreamPythonAPI

Generate and publish the Sphinx documentation to GitHub Pages

You can use the provided makefile (in the doc directory or in the root directory):

make gh-pages

About

Python wrapper of the SlipStream API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.4%
  • Makefile 0.6%