Python client library for Google Cloud Platform services including Datastore, Storage, and Pub/Sub
Overall
score
93%
{
"context": "This criteria evaluates the engineer's ability to use gcloud datastore transactions correctly to ensure atomic operations with proper isolation and automatic rollback. The focus is on proper use of transaction contexts, entity operations within transactions, and handling of transaction failures.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Transaction context usage",
"description": "Uses client.transaction() to create a transaction and executes operations within the transaction context (e.g., using 'with client.transaction() as txn:' or equivalent pattern)",
"max_score": 25
},
{
"name": "Entity operations in transaction",
"description": "Performs entity reads and writes within the transaction using transaction.get() and transaction.put() methods rather than client.get() and client.put()",
"max_score": 20
},
{
"name": "Key construction",
"description": "Creates entity keys correctly using datastore.Key with appropriate kind and identifier (e.g., datastore.Key('Account', account_id, project=project_id))",
"max_score": 10
},
{
"name": "Entity creation and modification",
"description": "Creates and modifies entities correctly using datastore.Entity with proper key assignment and property updates (e.g., entity = datastore.Entity(key=key); entity['balance'] = value)",
"max_score": 15
},
{
"name": "Validation before commit",
"description": "Implements validation logic (sufficient balance, positive amount) within the transaction before executing put operations",
"max_score": 10
},
{
"name": "Exception-based rollback",
"description": "Relies on Python exception handling to trigger automatic transaction rollback (raising exceptions for validation failures ensures transaction is not committed)",
"max_score": 15
},
{
"name": "Client initialization",
"description": "Properly uses the passed client parameter rather than creating new client instances within functions",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-gcloudevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10