I'm trying to create a Python function that generates a valid key in my Firebase Realtime Database (using the same logic as other keys, ensuring no collision and chronological order). Something like this: def get_new_key() -> str: return db.reference(app=firebase_app).push().key print(get_new_key()) # output: '-OOvws9uQDq9Ozacldjr' However, doing this actually creates the node with an empty string value, as specified in the doc. Is there any way to grab the key without adding anything to the database? My only thought right now would be to reimplement myself their key generation algorithm, but this looks overkill and not future-proof if this algorithm changes. Continue reading...