I am trying to save GeoPoint in my Firebase Firestore using Python, and I didn't have any success. This is giving me syntax error:
location=new firebase.firestore.GeoPoint(latitude, longitude)
Is there any solution for this? Maybe I'm missing something to import, but I can't find what. Thanks in advance.
You can use
from google.cloud.firestore import GeoPoint
# Just example values so the code runs.
latitude = 0.0
longitude = 0.0
location = GeoPoint(latitude, longitude)
print(location)
new
is not python keyword and needs not to be used.
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