pymongo-fastapi-crud
pymongo-fastapi-crud copied to clipboard
FastAPI is async, so this app must use Motor, not PyMongo
PyMongo is blocking, and is thus incompatible with FastAPI, which is asynchronous. Any long-running queries running in a single endpoint will block every other operation until it is complete.
A (relatively straightforward) switch to Motor should fix this issue.