Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

python firebase realtime listener

Tags:

People also ask

How do you query Firebase Realtime Database in Python?

How to Set Up a Firebase Realtime Database. Create a new project on Firebase – let's name it BookStoreProject. Once it has been set up, create a Realtime Database by selecting the Create Database option. When you click on Create Database, you have to specify the location of the database and the security rules.

What is Firebase_admin?

The Admin SDK is a set of server libraries that lets you interact with Firebase from privileged environments to perform actions like: Read and write Realtime Database data with full admin privileges.

How do I use onSnapshot?

You can listen to a document with the onSnapshot() method. An initial call using the callback you provide creates a document snapshot immediately with the current contents of the single document. Then, each time the contents change, another call updates the document snapshot.


Hi there I'm new in python. I would like to implement the listener on my Firebase DB. When I change one or more parameters on the DB my Python code have to do something. How can I do it? Thank a lot

my db is like simple list of data from 001 to 200:

"remote-controller"
001 -> 000
002 -> 020
003 -> 230

my code is:

from firebase import firebase
firebase = firebase.FirebaseApplication('https://remote-controller.firebaseio.com/', None)
result = firebase.get('003', None)
print result