Skip to content

Instantly share code, notes, and snippets.

@LuchoLopez
Created January 19, 2024 03:31
Show Gist options
  • Save LuchoLopez/70220f23101ddb29db6eaca1ac7b106c to your computer and use it in GitHub Desktop.
Save LuchoLopez/70220f23101ddb29db6eaca1ac7b106c to your computer and use it in GitHub Desktop.
Firebase - Firestore get documents in IDs list
from google.cloud.firestore_v1.field_path import FieldPath
def get_metrics(user_ids: list, db_client):
return db_client.collection(f'users').where(FieldPath.document_id(), 'in', user_ids).stream()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment