Skip to main content

A juju-core/gojuju simple synchronous python api client.

Project description

A simple synchronous python client for the juju-core/gojuju websocket api.

Example Usage:

from jujuclient import Environment

env = Environment("wss://instance-url:17070")
env.login('secret')
watcher = env.watch()

env.deploy('loadbalancer', 'cs:precise/haproxy')
env.deploy('db', 'cs:precise/mysql')
env.deploy('blog', 'cs:precise/wordpress')

env.add_relation('blog', 'db')
env.add_relation('blog', 'loadbalancer')

env.expose('loadbalancer')

env.set_config('blog', {'engine': 'apache'})
env.get_config('blog')
env.set_constraints('blog', {'cpu-cores': 4})
env.add_units('blog', 4)
env.remove_units(['blog/0'])

env.destroy_service('blog')

for change_set in watcher:
    print change_set

Project details


Download files

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

Source Distribution

jujuclient-0.17.2.tar.gz (8.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page