Update readme
[osm/N2VC.git] / README.md
1 # Front Matter
2
3 A python library for Juju.
4
5 NOTE: There is no implementation here yet. It is simply a mocked out
6 design of what this library might look like. The design itself is not
7 complete. Comments on the design, good or bad, are welcomed. Use cases
8 are also appreciated as they will shape the design.
9
10 The goal is to end up with a feature-full and officially supported
11 python library for Juju.
12
13 The focus right now is on Juju 2+ only.
14
15 # Design Ideas
16
17 * Present an object-oriented interface to all the features of the Juju
18   CLI
19 * Do as much as possible through the API so that the library can be used
20   without actually installing Juju
21
22 # Example Use Cases
23
24 Please add more!
25
26 ## Simple bootstrap/deploy
27
28 ```python
29 from juju import Juju
30
31 juju = Juju()
32 lxd = juju.get_cloud('lxd')
33 controller = lxd.bootstrap('lxd-test')
34 model = controller.get_model('default')
35
36 # We might want an async and blocking version of deploy()?
37 model.deploy('mediawiki-single')
38
39 mediawiki = model.get_service('mediawiki')
40 mediawiki.expose()
41 ```