I'm using Firebase in my Python program, and I'm successfully pushing user's details into database, but I want to make sure that those details are not repeating... Here's the code I'm using:
cred_obj = firebase_admin.credentials.Certificate(my_certificate)
firebase_admin.initialize_app(cred_obj, {'databaseURL': "https://my-url.com"})
ref = db.reference("/Users/Details")
ref.push().set({'ID': randomNumber})
Everytime user has started this program, he's login in with his ID, so I don't want to push it to the database again and again...
How can I make my program to push ID only if it doesn't exist in database?