Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Creating a new datastore.entity with a key name is a pain #82

Closed
@jgeewax

Description

@jgeewax

If I know I want to create a new Person named jim, it's a huge pain to get a handle on this entity.

What I would like to do:

entity = dataset.entity(['Person', 'jim'])
entity['age'] = 80
entity.save()

What I currently have to do:

key = Key.from_path(['Person', 'jim']).dataset(dataset)
entity = dataset.entity('Person').key(key)
entity['age'] = 80
entity.save()

This is a whole bunch of extra wiring I really shouldn't need to deal with.

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions