motorengine

MongoDb with FastAPI

孤街浪徒 提交于 2020-02-06 08:07:20
问题 I am playing around with FastAPI a bit and wanted to connect it to a MongoDB database. I however am confused which ODM to choose between motor which is async and mongoengine. Also, in the NoSQL example here they have created a new bucket and also the called the code to connect to db every time it is used. However, both motor and mongoengine seem to prefer a global connection. So what would be a good way to connect to mongodb? 回答1: I believe you already got your answers in the issue forums of