From 2526c1a00c4703bac1dac8c8119b5f71f9f2631e Mon Sep 17 00:00:00 2001 From: Nick Young Date: Tue, 30 Jul 2024 11:05:02 +1200 Subject: [PATCH] use service account --- update.ipynb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/update.ipynb b/update.ipynb index faa0ba1f..85be1851 100644 --- a/update.ipynb +++ b/update.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "code", - "execution_count": 1, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ @@ -34,8 +34,9 @@ "metadata": {}, "outputs": [], "source": [ - "ee.Authenticate()\n", - "ee.Initialize()" + "service_account = 'service-account@iron-dynamics-294100.iam.gserviceaccount.com'\n", + "credentials = ee.ServiceAccountCredentials(service_account, '.private-key.json')\n", + "ee.Initialize(credentials)" ] }, {