firebase / firebase/firebase-admin-python

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

オープン
#789 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
api: firestore type: feature request
主要言語
Python
スター
1.2k
フォーク
359
平均マージ
5日 6分
マージ済み PR(30日)
2

説明

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.
```python
db = firestore.client(app, database="my-db")
```

Alternatively the databaseId could be passed as an option when initializing the app.
```python
app = initialize_app(cred, options={"databaseId": "my-db")
```

I'd be willing to implement this feature.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。