X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/c10e9e5f3398d40a3346c7d7c1f84bf50262b8ec..3cbe55d440788b0b9b1a9d9e642103929b57e8fd:/doc/sdk/python/example.html.textile.liquid diff --git a/doc/sdk/python/example.html.textile.liquid b/doc/sdk/python/example.html.textile.liquid index 7ae5e58f8a..e91055e101 100644 --- a/doc/sdk/python/example.html.textile.liquid +++ b/doc/sdk/python/example.html.textile.liquid @@ -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 + +
+import arvados
+api = arvados.api("v1")
+
+ h2. create
@@ -14,23 +23,29 @@ result = api.collection().create(body={"collection": {"name": "create example"}}
 h2. delete
 
 
-result = api.collection().delete(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
+result = api.collections().delete(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
 
h2. get
-result = api.collection().get(uuid="aaaaa-bbbbb-ccccccccccccccc").execute()
+result = api.collections().get(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
 
h2. list
-result = api.collection().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
+result = api.collections().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
 
h2. update
-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()
+
+ +h2. Get current user + +
+result = api.users().current().execute()