All Questions
Tagged with google-cloud-firestore python
563 questions
0
votes
0
answers
194
views
Is it possible to test concurrent HTTP calls and Firestore side effects in Firebase Cloud Functions (Python, Gen 2)?
My goal is to write tests that:
Simulate multiple concurrent HTTP POST requests to a cloud function endpoint (e.g., 2-3 identical webhooks arriving almost simultaneously).
Verify database side ...
1
vote
1
answer
105
views
Is It Safe to Use stream() Inside a Firestore Transaction in Python?
While conducting a code review today, multiple AIs advised against using the stream() function within a Firestore transaction in Python.
However, I couldn't find any mention of this limitation in the ...
2
votes
1
answer
76
views
Firebase admin taking an infinite time to work
I recently started using firebase admin in python. I created this example script:
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore
cred = credentials....
2
votes
0
answers
76
views
Support CONNECT Flask server
I am trying to build a basic proxy server that's accessible from the internet to forward requests but also log them to Firebase database. I deployed my code on Google Cloud Run by creating an instance ...
0
votes
1
answer
56
views
Performing Collection Queries Within a Transaction: Python vs. Swift
In Python, we can perform queries on collections within a transaction using the following code snippet:
def write_upload_success(filename: str, uid: str, doc_id: str) -> DocumentReference:
db = ...
2
votes
1
answer
105
views
How to add data to Firestore database using python?
I am trying to add test_data dictionary to my Firestore database using python. It is not working since .set() method is not showing there anymore by vscode auto suggestion.
from datetime import ...
1
vote
1
answer
349
views
access firestore database other than (default) in python
I cannot access a Google Firestore database other than one named "(default)". I looked other other solutions online, and added a key to my credential "databaseId" but that doesn't ...
0
votes
1
answer
196
views
What can speed up this Firestore batch commit?
Summary
I'm using Firestore query listeners on a web client to pass python worker results back to browser as a json string. The results include a lot of Plotly graphs and the total size is ~3Mb of ...
0
votes
1
answer
37
views
How to access Firestore Database not Realtime Database
I have a firestore database on my project and want to read/write to it not the ReatlTime Firestore database. I copied the databaseURL which connects to the RealTime database but not the firestore ...
1
vote
0
answers
233
views
How to decode a protobuf Firestore event payload
I have a Cloud Run Function, that gets triggered on google.cloud.firestore.document.v1.written Firestore event, as outlined below:
from cloudevents.http import CloudEvent
import functions_framework
...
0
votes
0
answers
341
views
Can't decode event data in Cloud Run Function with a Firestore trigger
I have deployed a 2nd Gen Cloud Run Function with a Firestore trigger, on the google.cloud.datastore.entity.v1.written event. I have used the sample code shown in Google Cloud documentation:
from ...
0
votes
0
answers
20
views
How to access a non-default database in firebase project using Python? [duplicate]
I'm using python to interact with a firestore database. Up until now I've been using the following code to interact with the (default) database. Now that I've added a non-default database (through the ...
4
votes
2
answers
230
views
Firebase Firestore client cannot be deployed
I have an Firebase Cloud Functions codebase that uses Firestore database. Everything below works when I use it in local emulator using firebase emulators:start but when I need to deploy it to Firebase ...
1
vote
0
answers
75
views
How to convert Firestore timestamp to ISO 8601 in python?
I am writing a firebase cloud function in python to read data from firestore database and update it into the firebase realtime database, however I am facing an issue with converting the firestore ...
0
votes
1
answer
69
views
How to delete a key:value pair from Firebase map?
I have some code for managing a friend system using Firebase. The issue I am having is when a user accepts a friend request the request can be deleted. So this involves adding user1 to user2's friends ...