Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -17,17 +17,17 @@ def get_credentials():
|
|
| 17 |
try:
|
| 18 |
# Construct the service account info dictionary
|
| 19 |
service_account_info = {
|
| 20 |
-
auth_provider_x509_cert_url
|
| 21 |
-
auth_uri
|
| 22 |
-
client_email
|
| 23 |
-
client_id
|
| 24 |
-
client_x509_cert_url
|
| 25 |
-
private_key
|
| 26 |
-
private_key_id
|
| 27 |
-
project_id
|
| 28 |
-
service_account_type
|
| 29 |
-
token_uri
|
| 30 |
-
universe_domain
|
| 31 |
}
|
| 32 |
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
|
| 33 |
creds = Credentials.from_service_account_info(service_account_info, scopes=scope)
|
|
|
|
| 17 |
try:
|
| 18 |
# Construct the service account info dictionary
|
| 19 |
service_account_info = {
|
| 20 |
+
auth_provider_x509_cert_url : os.getenv('AUTH_PROVIDER_X509_CERT_URL')
|
| 21 |
+
auth_uri : os.getenv('AUTH_URI')
|
| 22 |
+
client_email : os.getenv('CLIENT_EMAIL')
|
| 23 |
+
client_id : os.getenv('CLIENT_ID')
|
| 24 |
+
client_x509_cert_url : os.getenv('CLIENT_X509_CERT_URL')
|
| 25 |
+
private_key : os.getenv('PRIVATE_KEY')
|
| 26 |
+
private_key_id : os.getenv('PRIVATE_KEY_ID')
|
| 27 |
+
project_id : os.getenv('PROJECT_ID')
|
| 28 |
+
service_account_type : os.getenv('SERVICE_ACCOUNT_TYPE')
|
| 29 |
+
token_uri : os.getenv('TOKEN_URI')
|
| 30 |
+
universe_domain : os.getenv('UNIVERSE_DOMAIN')
|
| 31 |
}
|
| 32 |
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
|
| 33 |
creds = Credentials.from_service_account_info(service_account_info, scopes=scope)
|