import firebase_admin from firebase_admin import credentials from firebase_admin import db # Fetch the service account key JSON file contents cred = credentials.Certificate('servicekey.json') # Initialize the app with a service account, granting admin privileges firebase_admin.initialize_app(cred, { 'databaseURL': 'https://farmbase-b2f7e-6733c.firebaseio.com/' }) # As an admin, the app has access to read and write all data, regradless of Security Rules ref = db.reference('sample') print(ref.get())