Category : firebase

I am trying to extract some information from Wikipedia. and I want to save those information in google firebase Real time data base. import openpyxl import firebase_admin from firebase_admin import credentials from firebase_admin import db from openpyxl import Workbook import wikipedia numberrow = 0 links = ["Xanthomonas campestris","Corynespora cassiicola","Myrothecium roridum","Phytophthora nicotianae var. parasitica","Phytophthora parasitica","Rhizoctonia solani","Thanatephorus ..

Read more

I’m working on a project where I’m using Firebase Realtime Database to connect to a Python Script. Since I will be making my project OPEN-SOURCE so I would like my Firebase Secret JSON file to not be shown when I commit to GitHub. I tried using python-dotenv to make the contents of the JSON file ..

Read more

I have 2 maps called favorite and recommend. Basically, both favorite and recommend contain a map movie_ID: rating. Here is how i want it. Here is my code to do that: def writeFavorite(dta, uid): user = db.collection(‘user’).document(uid) for i in dta: row = { ‘favorite’: {i[‘movie_id’]: i[‘rating’]} } user.set(row, merge=True) def writeRecommend(dta, uid): user = ..

Read more

Hi i tyr login in firebase admin and i try to validate token The code is: @APIGateway.post(‘/user/auth’) verify_login(authorization: HTTPAuthorizationCredentials = Depends(HTTPBearer(auto_error=False))): return validar_token(authorization.credentials) and the function validat token is : import firebase_admin from firebase_admin import credentials from firebase_admin import auth cred = credentials.Certificate(‘apigateway-firebase-hbeag- c06eb7278c.json’) default_app = firebase_admin.initialize_app(cred) id_project = default_app.project_id def validar_token(id_token): decoded_token = auth.verify_id_token(id_token, ..

Read more

I’m running python 3.9 with all firebase-admin and firestore modules installed. When trying to run my code importing firestore its giving an error. I have tried the same on my Mac and it works perfectly fine. This is the error: Traceback (most recent call last): File "/home/pi/.local/lib/python3.9/site-packages/firebase_admin/firestore.py", line 22, in <module> from google.cloud import firestore ..

Read more

Hi I’m trying to upload a file I have on the root of my folder, but I’m getting this error: Traceback (most recent call last): File "storage.py", line 19, in storage.child("testiƱo.jpg").put("test.jpg") File "/home/mrfiddle/.local/lib/python3.6/site-packages/pyrebase/pyrebase.py", line 389, in put file_object = open(file, ‘rb’) FileNotFoundError: [Errno 2] No such file or directory: ‘test.jpg’ This is my code import ..

Read more