Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
@@ -13,17 +13,17 @@ app = FastAPI()
|
|
13 |
# Function to fetch the credentials
|
14 |
def get_credentials_from_env():
|
15 |
service_account_info = {
|
16 |
-
"type": os.
|
17 |
-
"project_id": os.
|
18 |
-
"private_key_id": os.
|
19 |
-
"private_key": os.
|
20 |
-
"client_email": os.
|
21 |
-
"client_id": os.
|
22 |
-
"auth_uri": os.
|
23 |
-
"token_uri": os.
|
24 |
-
"auth_provider_x509_cert_url": os.
|
25 |
-
"client_x509_cert_url": os.
|
26 |
-
"universe_domain": os.
|
27 |
}
|
28 |
|
29 |
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
|
|
|
13 |
# Function to fetch the credentials
|
14 |
def get_credentials_from_env():
|
15 |
service_account_info = {
|
16 |
+
"type": os.getenv("SERVICE_ACCOUNT_TYPE"),
|
17 |
+
"project_id": os.getenv("PROJECT_ID"),
|
18 |
+
"private_key_id": os.getenv("PRIVATE_KEY_ID"),
|
19 |
+
"private_key": os.getenv("PRIVATE_KEY").replace('\\n', '\n'),
|
20 |
+
"client_email": os.getenv("CLIENT_EMAIL"),
|
21 |
+
"client_id": os.getenv("CLIENT_ID"),
|
22 |
+
"auth_uri": os.getenv("AUTH_URI"),
|
23 |
+
"token_uri": os.getenv("TOKEN_URI"),
|
24 |
+
"auth_provider_x509_cert_url": os.getenv("AUTH_PROVIDER_X509_CERT_URL"),
|
25 |
+
"client_x509_cert_url": os.getenv("CLIENT_X509_CERT_URL"),
|
26 |
+
"universe_domain": os.getenv("UNIVERSE_DOMAIN")
|
27 |
}
|
28 |
|
29 |
scope = ['https://spreadsheets.google.com/feeds', 'https://www.googleapis.com/auth/drive']
|