File size: 323 Bytes
152cd46
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
import firebase_admin
from firebase_admin import credentials
from firebase_admin import firestore


def load_firestore():
    # Use a service account.
    cred = credentials.Certificate('firestore_keys/lawllm-427510-582b20c51958.json')
    app = firebase_admin.initialize_app(cred)
    db = firestore.client()
    return db