firebase-admin-python icon indicating copy to clipboard operation
firebase-admin-python copied to clipboard

[FR] Add the `increment` method for realtime database

Open Tom3652 opened this issue 2 years ago • 1 comments

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.

Tom3652 avatar Feb 17 '23 17:02 Tom3652

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

google-oss-bot avatar Feb 17 '23 17:02 google-oss-bot