projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote-tracking branch 'origin/master' into 15106-trgm-text-search
[arvados.git]
/
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 6f6ba99dede4de2109e4d6edadcbd051a91ccfb9..504d0784f0ca003610e3b72b630e75e2e4f4a141 100644
(file)
--- a/
doc/sdk/python/example.html.textile.liquid
+++ b/
doc/sdk/python/example.html.textile.liquid
@@
-14,43
+14,43
@@
In these examples, the site prefix is @aaaaa@.
h2. Initialize SDK
h2. Initialize SDK
-<pre>
+{% codeblock as python %}
import arvados
api = arvados.api("v1")
import arvados
api = arvados.api("v1")
-</pre>
+{% endcodeblock %}
h2. create
h2. create
-<pre>
+{% codeblock as python %}
result = api.collections().create(body={"collection": {"name": "create example"}}).execute()
result = api.collections().create(body={"collection": {"name": "create example"}}).execute()
-</pre>
+{% endcodeblock %}
h2. delete
h2. delete
-<pre>
+{% codeblock as python %}
result = api.collections().delete(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
result = api.collections().delete(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
-</pre>
+{% endcodeblock %}
h2. get
h2. get
-<pre>
+{% codeblock as python %}
result = api.collections().get(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
result = api.collections().get(uuid="aaaaa-4zz18-ccccccccccccccc").execute()
-</pre>
+{% endcodeblock %}
h2. list
h2. list
-<pre>
+{% codeblock as python %}
result = api.collections().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
result = api.collections().list(filters=[["uuid", "=", "aaaaa-bbbbb-ccccccccccccccc"]]).execute()
-</pre>
+{% endcodeblock %}
h2. update
h2. update
-<pre>
+{% codeblock as python %}
result = api.collections().update(uuid="aaaaa-4zz18-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
result = api.collections().update(uuid="aaaaa-4zz18-ccccccccccccccc", body={"collection": {"name": "update example"}}).execute()
-</pre>
+{% endcodeblock %}
h2. Get current user
h2. Get current user
-<pre>
+{% codeblock as python %}
result = api.users().current().execute()
result = api.users().current().execute()
-</pre>
+{% endcodeblock %}