Created
January 4, 2019 15:36
-
-
Save cbrannen9a/9ac70121df4c4823a234be8e5e25fa01 to your computer and use it in GitHub Desktop.
Checking data from firestore
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, firestore | |
cred = credentials.Certificate("./ServiceAccountKey.json") | |
app = firebase_admin.initialize_app(cred) | |
store = firestore.client() | |
doc_ref = store.collection(u'COLLECTION_TO_CHECK') | |
data = [] | |
docs = doc_ref.get() | |
for doc in docs: | |
data.append(doc.to_dict()) | |
print(len(data)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment