Streamlit - Firebase Connectivity error

Hi

Firestore & Streamlit | Create a Serverless Web App in Python I read this article and am trying to connect to firestore. But the import statement is failing

from google.cloud import firestore

streamlit raises an error

image

I added firebase specific packages in requirements.txt to see whether it sovles the issue. But it didn’t

image

I am working with GitHub codespaces. The application is on the cloud itself and no local installations. Please help.

Hi @t7support

Have you tried using firebase-admin as the Python library to access firestore?

Then import via:

from firebase_admin import firestore

More info in the Firebase Docs Para começar com o Cloud Firestore  |  Firebase

Hope this helps!

I did “pip install google-cloud-firestore” in github codespace terminal and it worked.