Created
June 17, 2021 18:15
-
-
Save Namyalg/aca7e5cba6b5d6c859553a626c37ed3c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import firebase_admin | |
from firebase_admin import credentials | |
from firebase_admin import db | |
# Fetch the service account key JSON file contents | |
cred = credentials.Certificate('secret key.json') | |
# Initialize the app with a service account, granting admin privileges | |
firebase_admin.initialize_app(cred, { | |
'databaseURL': "URL to database" | |
}) | |
ref = db.reference('Database reference') | |
print(ref.get()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment