firebase-admin-python
firebase-admin-python copied to clipboard
[FR] Add the `increment` method for realtime database
Is your feature request related to a problem? Please describe.
Please see this SO question 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.
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.