forked from Future-Gadgets-Lab/FOS-Fire-SOS-System
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFirebase dummy updation.py
27 lines (25 loc) · 978 Bytes
/
Firebase dummy updation.py
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
import pyrebase
import platform
import os
import glob
import time
import cv2
import time
config={ #fill according to your firebase database
"apiKey": "AIzaSyDii0z_SxTaFpUwwTNkw3m8B7rIh5OEImM",
"authDomain": "lifesaver-18f28.firebaseapp.com",
"databaseURL": "https://lifesaver-18f28.firebaseio.com/",
"storageBucket": "lifesaver-18f28.appspot.com"
}
firebase =pyrebase.initialize_app(config)
db=firebase.database()
#def stream_handler(message):
# print(message["data"])
while(True):
#my_stream = db.child("Cars").child(Plate).stream(stream_handler)
db.child("user").child("Dummy").child("Dummy").child('lat').set(27.65)
#print(time.time())
db.child("user").child("Dummy").child("Dummy").child('long').set(77.11)
db.child("user").child("Dummy").child("Dummy").child('severity').set(1)
db.child("user").child("Dummy").child("Dummy").child('spread').set(30)
db.child("user").child("Dummy").remove()