@@ -150,26 +150,26 @@ def incomplete_key(client):
150
150
151
151
def named_key (client ):
152
152
# [START datastore_named_key]
153
- key = client .key ("Task" , "sample_task " )
153
+ key = client .key ("Task" , "sampleTask " )
154
154
# [END datastore_named_key]
155
155
156
156
return key
157
157
158
158
159
159
def key_with_parent (client ):
160
160
# [START datastore_key_with_parent]
161
- key = client .key ("TaskList" , "default" , "Task" , "sample_task " )
161
+ key = client .key ("TaskList" , "default" , "Task" , "sampleTask " )
162
162
# Alternatively
163
163
parent_key = client .key ("TaskList" , "default" )
164
- key = client .key ("Task" , "sample_task " , parent = parent_key )
164
+ key = client .key ("Task" , "sampleTask " , parent = parent_key )
165
165
# [END datastore_key_with_parent]
166
166
167
167
return key
168
168
169
169
170
170
def key_with_multilevel_parent (client ):
171
171
# [START datastore_key_with_multilevel_parent]
172
- key = client .key ("User" , "alice" , "TaskList" , "default" , "Task" , "sample_task " )
172
+ key = client .key ("User" , "alice" , "TaskList" , "default" , "Task" , "sampleTask " )
173
173
# [END datastore_key_with_multilevel_parent]
174
174
175
175
return key
@@ -193,7 +193,7 @@ def basic_entity(client):
193
193
194
194
def entity_with_parent (client ):
195
195
# [START datastore_entity_with_parent]
196
- key_with_parent = client .key ("TaskList" , "default" , "Task" , "sample_task " )
196
+ key_with_parent = client .key ("TaskList" , "default" , "Task" , "sampleTask " )
197
197
198
198
task = datastore .Entity (key = key_with_parent )
199
199
@@ -241,7 +241,7 @@ def array_value(client):
241
241
242
242
def upsert (client ):
243
243
# [START datastore_upsert]
244
- complete_key = client .key ("Task" , "sample_task " )
244
+ complete_key = client .key ("Task" , "sampleTask " )
245
245
246
246
task = datastore .Entity (key = complete_key )
247
247
@@ -288,7 +288,7 @@ def update(client):
288
288
289
289
# [START datastore_update]
290
290
with client .transaction ():
291
- key = client .key ("Task" , "sample_task " )
291
+ key = client .key ("Task" , "sampleTask " )
292
292
task = client .get (key )
293
293
294
294
task ["done" ] = True
@@ -304,7 +304,7 @@ def lookup(client):
304
304
upsert (client )
305
305
306
306
# [START datastore_lookup]
307
- key = client .key ("Task" , "sample_task " )
307
+ key = client .key ("Task" , "sampleTask " )
308
308
task = client .get (key )
309
309
# [END datastore_lookup]
310
310
@@ -316,7 +316,7 @@ def delete(client):
316
316
upsert (client )
317
317
318
318
# [START datastore_delete]
319
- key = client .key ("Task" , "sample_task " )
319
+ key = client .key ("Task" , "sampleTask " )
320
320
client .delete (key )
321
321
# [END datastore_delete]
322
322
@@ -767,7 +767,9 @@ def transfer_funds(client, from_key, to_key, amount):
767
767
def transactional_get_or_create (client ):
768
768
# [START datastore_transactional_get_or_create]
769
769
with client .transaction ():
770
- key = client .key ("Task" , datetime .datetime .now (tz = datetime .timezone .utc ).isoformat ())
770
+ key = client .key (
771
+ "Task" , datetime .datetime .now (tz = datetime .timezone .utc ).isoformat ()
772
+ )
771
773
772
774
task = client .get (key )
773
775
0 commit comments