Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

History

History
History
53 lines (43 loc) 路 1.55 KB

File metadata and controls

53 lines (43 loc) 路 1.55 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import os
from dotenv import load_dotenv
dotenv_path = "./credentials.env"
load_dotenv(dotenv_path)
firebaseConfig = {
"apiKey": "",
"authDomain": "",
"databaseURL": "",
"projectId": "",
"storageBucket": "",
"messagingSenderId": "",
"appId": "",
"measurementId": ""
}
def get_fireBase_credentials():
try:
# Accessing variables.
apiKey = os.getenv('apiKey')
authDomain = os.getenv('authDomain')
databaseURL = os.getenv('databaseURL')
projectId = os.getenv('projectId')
storageBucket = os.getenv('storageBucket')
messagingSenderId = os.getenv('messagingSenderId')
appId = os.getenv('appId')
measurementId = os.getenv('measurementId')
credentials = [apiKey, authDomain, databaseURL, projectId, storageBucket, messagingSenderId, appId,
measurementId]
if any(not(credential) for credential in credentials):
raise ValueError("Value cannot be None ")
else:
firebaseConfig["apiKey"] = apiKey
firebaseConfig["authDomain"] = authDomain
firebaseConfig["databaseURL"] = databaseURL
firebaseConfig["projectId"] = projectId
firebaseConfig["storageBucket"] = storageBucket
firebaseConfig["messagingSenderId"] = messagingSenderId
firebaseConfig["appId"] = appId
firebaseConfig["measurementId"] = measurementId
except:
print("error while getting the Keys ")
raise
return firebaseConfig
get_fireBase_credentials()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.