Skip to content

Instantly share code, notes, and snippets.

View lowlevl's full-sized avatar

maya_t lowlevl

  • Somewhere, France
  • 06:56 (UTC +01:00)
View GitHub Profile
@lowlevl
lowlevl / main.py
Last active June 26, 2020 16:08
Transactionnal decorator for Python & GCP Datastore
from google.cloud import datastore
from .transactionnal import transactionnal
client = datastore.Client('<project-id>', '<namespace>')
key = <get a key somehow>
##
# > @transactionnal(client)
# > def _():