This is a gist used in the following blog posts:
This file contains hidden or 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
| pipeline = [ | |
| { | |
| '$lookup': { | |
| 'from': 'students', | |
| 'as': 'studentArray', | |
| 'pipeline': [ | |
| { | |
| '$sort': { | |
| 'balance_coins': -1 | |
| } |
This file contains hidden or 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 firestore | |
| from firebase_admin import auth | |
| # Download the service account json from Project Setting > Service Accounts Generate Private Key | |
| service_account = 'project.json' | |
| cred = credentials.Certificate(service_account) | |
| firebase_admin.initialize_app(cred) | |
| for user in auth.list_users().iterate_all(): |
OlderNewer