def get_docum(db, collectrion, query):
client = pymongo.MongoClient(variables.mongoIp, variables.mongoPort)
db = client[db]
collection = db[collectrion]
result = []
for i in collection.find(query):
result.append(i)
return result
get_docum("test", "test", ({}, {"id": 1}))
for i in collection.find(query):
for i in collection.find(*query):