Skip to content

FastAPI is async, so this app must use Motor, not PyMongo #5

@judy2k

Description

@judy2k

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions