Python wrapper of the SlipStream API
$ pip install slipstream-api
$ 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()
$ sh
git clone https://github.com/slipstream/SlipStreamPythonAPI.git
cd SlipStreamPythonAPI/
pip install --editable .
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
There is a Sphinx documentation available at http://slipstream.github.io/SlipStreamPythonAPI
You can use the provided makefile (in the doc
directory or in the root directory):
make gh-pages