import certifi
import pymongo
conn = pymongo.MongoClient(
'mongodb+srv://<username>:<password>@cluster0.eknio.mongodb.net/<dbName>?retryWrites=true&w=majority', tlsCAFile=certifi.where())
db = conn['<dbName>']
col = db.<collectionName>
array = list(col.find())
print(array)