Pyrebase icon indicating copy to clipboard operation
Pyrebase copied to clipboard

Pyrebase adding data into my RealTime Database instead of my Cloud Firestore

Open JustinSoh opened this issue 7 years ago • 5 comments

Hello,

I am trying to get Pyrebase to load my Cloud Firestore data instead of my RealTime database. However it is not working

Below is my python code

cred = credentials.Certificate('./LogHub.json')
  config = {
      "apiKey": "AIzaSyBQ1Tm2JWX_XAEutBhjYbOSAZtn570pEK8",
      "authDomain": "loghub-e4ef1.firebaseapp.com",
      "databaseURL":"https://loghub-e4ef1.firebaseio.com",
      "projectId": "loghub-e4ef1",
      "storageBucket": "loghub-e4ef1.appspot.com",
      "messagingSenderId": "891241683969",
      "serviceAccount": "./LogHub.json"
  };

  firebase = pyrebase.initialize_app(config)
  db = firebase.database()
  print(db.child().get().val())
  # return bandwidth.val();
  return "testing";

The result i get is OrderedDict([('Users', {'-LIWWxmHgvvgCiagoxXa': {'name': "Mortimer 'Morty' Smith"}}), ('users', {'-LIWWkgyUJwLG2tESLMb': {'name': "Mortimer 'Morty' Smith"}})])

I have checked in both my realtime database and Cloud firestore and realized the above data is stored in my realtime database and not my cloud firestore. How can i make it so that i retrieve data out of the cloud firestore instead

JustinSoh avatar Jul 28 '18 16:07 JustinSoh

Hi @JustinSoh , I have the same issue. Do you have any progress here?

wesinalves avatar May 10 '19 18:05 wesinalves

Does anyone have an answer? I have the same issue

lequoclap avatar May 17 '19 13:05 lequoclap

https://stackoverflow.com/questions/55203994/permission-denied-on-firebase-database-using-pyrebase

rimander123 avatar Oct 23 '19 17:10 rimander123

Does anyone figured it out to make Pyrebase work with Google Cloud Firestore, not Realtime DB ?

xpatronum avatar Jun 22 '20 01:06 xpatronum