Merge branch 'master' into 9998-unsigned_manifest
[arvados.git] / doc / sdk / python / example.html.textile.liquid
index 7ae5e58f8a849e6a5e925bc6f0efc6fbefcde315..e91055e101e9e8004e7044006093253b320189d7 100644 (file)
@@ -2,9 +2,18 @@
 layout: default
 navsection: sdk
 navmenu: Python
-title: Python SDK examples
+title: Examples
 ...
 
+In these examples, the site prefix is @aaaaa@.
+
+h2.  Initialize SDK
+
+<pre>
+import arvados
+api = arvados.api("v1")
+</pre>
+
 h2. create
 
 <pre>
@@ -14,23 +23,29 @@ result = api.collection().create(body={"collection": {"name": "create example"}}
 h2. delete
 
 <pre>
-result = api.collection().delete(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
+result = api.collections().delete(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
 </pre>
 
 h2. get
 
 <pre>
-result = api.collection().get(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
+result = api.collections().get(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
 </pre>
 
 h2. list
 
 <pre>
-result = api.collection().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
+result = api.collections().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
 </pre>
 
 h2. update
 
 <pre>
-result = api.collection().update(uuid="aaaaa-bbbbb-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
+result = api.collections().update(uuid="aaaaa-4zz18-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
+</pre>
+
+h2. Get current user
+
+<pre>
+result = api.users().current().execute()
 </pre>