firebase / firebase/firebase-admin-python
[FR] Add the `increment` method for realtime database
未关闭
api: database
type: feature request
- 主要语言
- Python
- 星标
- 1.2k
- 派生
- 359
- 平均合并
- 5 天 6 分钟
- 30 天内合并 PR
- 2
描述
**Is your feature request related to a problem? Please describe.**
Please see this SO [question](https://stackoverflow.com/questions/75486368/how-to-increment-values-in-firebase-realtime-database-python/75486555#75486555) that i have asked.
**Describe the solution you'd like**
I would like to be able to increment a value server side such as :
```
from firebase_admin import db
realtime_db = db.reference(path="/", app=app, url="myurl")
realtime_db.update({
f"chats/{uid}/num": db.increment(1),
})
```
**Describe alternatives you've considered**
The alternative described in the SO question as an answer.
贡献指南
评估
这个 Issue 还没有评估数据。