I'm trying to integrate firebase with my python project. Using firebase cloud.
I want to get a result like the following:
Name: xxxxx
Surname: xxxxxxx Address: xxxxxxx
To do this, use the following code to perform the query.
import firebase_admin
from firebase_admin import credentials
from firebase_admin import db
from firebase_admin import firestore
cred = credentials.Certificate('C:/Users/Angel/Desktop/nuevo.json')
firebase_admin.initialize_app(cred)
db = firestore.client()
carpeta = db.collection(u'Usuarios')
nombre1 = carpeta.get()
for n in nombre1:
print(u'{}:{}'.format(n.id,n.to_dict()))
But the result thrown at me is:
Adminstradores:{'Dirección': 'Zaragoza 17', 'Nombre': 'Angel', 'Apelliso': 'Alvarez'}
[Finished in 2.6s]
Does anyone know how I can solve it?
This is the structure of the database.