Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] Change the firestore db in firestore.client. #789

Open
paluchs opened this issue May 28, 2024 · 1 comment
Open

[FR] Change the firestore db in firestore.client. #789

paluchs opened this issue May 28, 2024 · 1 comment

Comments

@paluchs
Copy link

paluchs commented May 28, 2024

In short: There is currently no way to change the firestore database to write to from default.
See question on stackoverflow: https://stackoverflow.com/questions/78533417/how-to-write-to-a-firestore-db-other-than-default-in-a-python-cloud-function

As far as I understand there is currently no option to pass the databaseId to firestore.client or to the options when initializing the app (initialize_app(cred)). You can pass the databaseURL to the options in initialze_app, however the Url cannot be looked up in the firebase console anymore.

In my opinion, it would make sense to passt database as an argument to firestore.client() much like you would when initializing the Client class in google.cloud.firestore directly.

db = firestore.client(app, database="my-db")

Alternatively the databaseId could be passed as an option when initializing the app.

app = initialize_app(cred, options={"databaseId": "my-db")

I'd be willing to implement this feature.

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

@paluchs paluchs changed the title [FR] There is currently no way to change the firestore db when using cloud functions. [FR] Change the firestore db in firestore.client. May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants