Phil Girard
Dec 18, 2020

It is not needed if you run "uvicorn main:app --reload" from the command line instead of running `python main.py`.

Your solution is good too. Both are equivalent as they will trigger uvicorn to load the file in the right way.

Source https://fastapi.tiangolo.com/

Phil Girard
Phil Girard

Responses (1)