add google credentials
Browse files- play_helper.py +14 -1
play_helper.py
CHANGED
@@ -33,10 +33,23 @@ def declare_components():
|
|
33 |
|
34 |
|
35 |
# %%
|
36 |
-
_creds, _ = google.auth.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
_service = build("drive", "v3", credentials=_creds)
|
38 |
_files = _service.files()
|
39 |
|
|
|
40 |
# %%
|
41 |
js_remove_input_helper = """(s) => {
|
42 |
var el = document.getElementById('lintao-container');
|
|
|
33 |
|
34 |
|
35 |
# %%
|
36 |
+
_creds, _ = google.auth.load_credentials_from_dict({
|
37 |
+
"type": "service_account",
|
38 |
+
"project_id": os.getenv("GOOGLE_AUTH_CREDS_PROJECT_ID", ""),
|
39 |
+
"private_key_id": os.getenv("GOOGLE_AUTH_CREDS_PRIVATE_KEY_ID", ""),
|
40 |
+
"private_key": os.getenv("GOOGLE_AUTH_CREDS_PRIVATE_KEY", ""),
|
41 |
+
"client_email": os.getenv("GOOGLE_AUTH_CREDS_CLIENT_EMAIL", ""),
|
42 |
+
"client_id": os.getenv("GOOGLE_AUTH_CREDS_CLIENT_ID", ""),
|
43 |
+
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
|
44 |
+
"token_uri": "https://oauth2.googleapis.com/token",
|
45 |
+
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
|
46 |
+
"client_x509_cert_url": os.getenv("GOOGLE_AUTH_CREDS_CLIENT_X509_CERT_URL", ""),
|
47 |
+
"universe_domain": "googleapis.com"
|
48 |
+
})
|
49 |
_service = build("drive", "v3", credentials=_creds)
|
50 |
_files = _service.files()
|
51 |
|
52 |
+
|
53 |
# %%
|
54 |
js_remove_input_helper = """(s) => {
|
55 |
var el = document.getElementById('lintao-container');
|