def DBConnection(self): self.firebaseClient = FirebaseApplication( 'https://eat2fit-adcd2.firebaseio.com', authentication=None) authentication = FirebaseAuthentication( 'JQxgwXKOwoBa5piS5cphXoc0ToiJaq2qDwAkPzPo', '*****@*****.**', extra={'id': 'kRZ84YKZXPS9ZIIULOVOV8pXUQt2'}) self.firebaseClient.authentication = authentication user = authentication.get_user()
from firebase.firebase import FirebaseApplication from firebase.firebase import FirebaseAuthentication #import for firebase import time #===========================FIREBASE ACCESS======================= app = FirebaseApplication('https://adminflashline.firebaseio.com/', authentication=None) authentication = FirebaseAuthentication( 'pt14BYHQUUxMhFoa0Eigtr59aIa3Gyfvwoc209Tu', '*****@*****.**', extra={'id': 123}) app.authentication = authentication user = authentication.get_user() result = app.get('/Ticket/ticketnum', None) print('===============================') print('Result: ' + str(result)) resultInc = result + 1 app.put('/Ticket', "ticketnum", resultInc) result = app.get('/Ticket/ticketnum', None) print result time.sleep(4) resultInc = result + 1 app.put('/Ticket', "ticketnum", resultInc) result = app.get('/Ticket/ticketnum', None) print result