Skip to content

Why do I need to do 2 imports for datastore transactions? #684

@jgeewax

Description

@jgeewax

What I see in the docs:

>>> from gcloud import datastore
>>> from gcloud.datastore.transaction import Transaction
>>> datastore.set_defaults()
>>> with Transaction():
...     datastore.put([entity1, entity2])

What I want to do:

>>> from gcloud import datastore
>>> with datastore.Transaction() as t:
...     t.put([entity1, entity2])

Metadata

Metadata

Assignees

Labels

api: datastoreIssues related to the Datastore API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions