Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions datastore/cloud-client/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,28 @@


def incomplete_key(client):
# [START datastore_incomplete_key]
# [START datastore_incomplete_key2]
key = client.key('Task')
# [END datastore_incomplete_key]
# [END datastore_incomplete_key2]

return key


def named_key(client):
# [START datastore_named_key]
# [START datastore_named_key2]
key = client.key('Task', 'sample_task')
# [END datastore_named_key]
# [END datastore_named_key2]

return key


def key_with_parent(client):
# [START datastore_key_with_parent]
# [START datastore_key_with_parent2]
key = client.key('TaskList', 'default', 'Task', 'sample_task')
# Alternatively
parent_key = client.key('TaskList', 'default')
key = client.key('Task', 'sample_task', parent=parent_key)
# [END datastore_key_with_parent]
# [END datastore_key_with_parent2]

return key

Expand Down