Download init_firebase.py from sarim/pix: direct link, hf CLI and curl.
- Browser
- Download file 263 Bytes
-
https://huggingface.co/spaces/sarim/pix/resolve/main/init_firebase.py
- Command line
-
hf download hf://spaces/sarim/pix/init_firebase.py
-
curl -L -o init_firebase.py https://huggingface.co/spaces/sarim/pix/resolve/main/init_firebase.py
263 Bytes
| import firebase_admin | |
| from firebase_admin import credentials, firestore | |
| cred = credentials.Certificate( | |
| "stokistan-332f5-firebase-adminsdk-fbsvc-5b6cddb01e.json" | |
| ) | |
| if not firebase_admin._apps: | |
| firebase_admin.initialize_app(cred) | |
| db = firestore.client() |