forked from ndleah/python-mini-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb.py
More file actions
24 lines (20 loc) · 760 Bytes
/
db.py
File metadata and controls
24 lines (20 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#Importing Firebase
from firebase import Firebase
import os
#Intializing Firebase Configuration from the Environment Variables
config = {
"apiKey": os.environ.get("FIREBASE_APIKEY"),
"authDomain": os.environ.get("FIREBASE_AUTHDOMAIN"),
"databaseURL": os.environ.get("FIREBASE_DATABASEURL"),
"projectId": os.environ.get("FIREBASE_PROJECT_ID"),
"storageBucket": os.environ.get("FIREBASE_STORAGE_BUCKET"),
"messagingSenderId": os.environ.get("FIREBASE_MESSAGING_SENDER_ID"),
"appId": os.environ.get("FIREBASE_APP_ID"),
"measurementId": os.environ.get("FIREBASE_MEASUREMENT_ID")
}
#Intializing Firebase Object
firebase = Firebase(config)
#Intializing Firebase Databse
db = firebase.database()
#Intializing Firebase Auth
auth = firebase.auth()