class Image_Pust_(): client = motor.motor_asyncio.AsyncIOMotorClient('数据库链接') sss = client.sss test1 = sss.test1
async def Rand_find(self, document=None): c = Image_Pust_().sss.test1 a = c.aggregate([{"$sample": {"size": 15}}]) return [i async for i in a]
|