Pagenation firestore data in python

Hey there i need to Pagenate this code can you guys please help me out i tried the docs but not able to get hold of it.

cases = db.collection(u'hospitals').document(request.session['hospital_email']).collection('cases').where(
            u'status', u'==', "done").where("formstatus", "==", "draft").order_by(u'date').limit(3).get()

        for i in cases:
            cases_data[i.id] = i.to_dict()
            print(cases_data[i.id], " ==>", i.to_dict())
            print("")

Source: Python Questions

LEAVE A COMMENT