Trying to integrate Google firestore API at python server
...
File "/home/daffolap-355/repos/subscriptions/appvendor/firebase_admin/firestore.py", line 28, in <module>
raise ImportError('Failed to import the Cloud Firestore library for Python. Make sure '
ImportError: Failed to import the Cloud Firestore library for Python. Make sure to install the "google-cloud-firestore" module.
I get this error here:
from firebase_admin import credentials, auth, firestore
I installed the firebase-admin module:
pip install --upgrade -t libs firebase-admin
And run the app
dev_appserver app.yaml
Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. While the Firestore interface has many of the same features as traditional databases, as a NoSQL database it differs from them in the way it describes relationships between data objects.
Google Cloud Firestore requires grpc.
pip install grpcio
However, there are additional steps depending on your OS. Check out https://github.com/grpc/grpc/tree/master/src/python/grpcio
To solve the "google-cloud-firestore" module error do this:
And then import like this:
This worked for me. Try uninstalling and re-installing google-cloud-firestore
Uninstall "google-cloud-firestore" using pip
pip uninstall google-cloud-firestore
Re-install it using pip again
pip install google-cloud-firestore
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With