@@ -54,11 +54,11 @@ We need a dataset in ICAT that the uploaded files should be put into,
5454so let's create one::
5555
5656 >>> from icat.query import Query
57- >>> query = Query(client, "Investigation", conditions={ "name": "= '12100409-ST'"} )
57+ >>> query = Query(client, "Investigation", conditions=[( "name", "= '12100409-ST'")] )
5858 >>> investigation = client.assertedSearch(query)[0]
5959 >>> dataset = client.new("Dataset")
6060 >>> dataset.investigation = investigation
61- >>> query = Query(client, "DatasetType", conditions={ "name": "= 'other'"} )
61+ >>> query = Query(client, "DatasetType", conditions=[( "name", "= 'other'")] )
6262 >>> dataset.type = client.assertedSearch(query)[0]
6363 >>> dataset.name = "greetings"
6464 >>> dataset.complete = False
@@ -67,7 +67,7 @@ so let's create one::
6767For each of the files, we create a new datafile object and call the
6868:meth: `~icat.client.Client.putData ` method to upload it::
6969
70- >>> query = Query(client, "DatafileFormat", conditions={ "name": "= 'Text'"} )
70+ >>> query = Query(client, "DatafileFormat", conditions=[( "name", "= 'Text'")] )
7171 >>> df_format = client.assertedSearch(query)[0]
7272 >>> for fname in ("greet-jdoe.txt", "greet-nbour.txt", "greet-rbeck.txt"):
7373 ... datafile = client.new("Datafile",
@@ -131,10 +131,10 @@ Download files
131131We can request a download of a set of data using the
132132:meth: `~icat.client.Client.getData ` method::
133133
134- >>> query = Query(client, "Datafile", conditions={
135- ... "name": "= 'greet-jdoe.txt'",
136- ... "dataset.name": "= 'greetings'"
137- ... } )
134+ >>> query = Query(client, "Datafile", conditions=[
135+ ... ( "name", "= 'greet-jdoe.txt'") ,
136+ ... ( "dataset.name", "= 'greetings'"),
137+ ... ] )
138138 >>> df = client.assertedSearch(query)[0]
139139 >>> data = client.getData([df])
140140 >>> type(data)
@@ -153,7 +153,7 @@ with the requested files::
153153
154154 >>> from io import BytesIO
155155 >>> from zipfile import ZipFile
156- >>> query = Query(client, "Dataset", conditions={ "name": "= 'greetings'"} )
156+ >>> query = Query(client, "Dataset", conditions=[( "name", "= 'greetings'")] )
157157 >>> ds = client.assertedSearch(query)[0]
158158 >>> data = client.getData([ds])
159159 >>> buffer = BytesIO(data.read())
0 commit comments