8784: Fix test for latest firefox.
[arvados.git] / doc / sdk / python / example.html.textile.liquid
1 ---
2 layout: default
3 navsection: sdk
4 navmenu: Python
5 title: Examples
6 ...
7
8 In these examples, the site prefix is @aaaaa@.
9
10 h2.  Initialize SDK
11
12 <pre>
13 import arvados
14 api = arvados.api("v1")
15 </pre>
16
17 h2. create
18
19 <pre>
20 result = api.collection().create(body={"collection": {"name": "create example"}}).execute()
21 </pre>
22
23 h2. delete
24
25 <pre>
26 result = api.collections().delete(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
27 </pre>
28
29 h2. get
30
31 <pre>
32 result = api.collections().get(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
33 </pre>
34
35 h2. list
36
37 <pre>
38 result = api.collections().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
39 </pre>
40
41 h2. update
42
43 <pre>
44 result = api.collections().update(uuid="aaaaa-4zz18-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
45 </pre>
46
47 h2. Get current user
48
49 <pre>
50 result = api.users().current().execute()
51 </pre>