modern-wolf-36228
09/21/2021, 9:06 PMuvicorn.run("<module>:<app variable>", reload=True)
full-keyboard-92367
09/22/2021, 6:19 AMfrom project1.main import app
uvicorn.run(app)
it will resolve dependencies and work
But
uvicorn.run("project1.main:app")
will fail with "Cannot Import project1.main"modern-wolf-36228
09/22/2021, 6:21 AMproject1
to the dependencies=
on the BUILD filemodern-wolf-36228
09/22/2021, 6:21 AM--loop
on pants is the way to go heremodern-wolf-36228
09/22/2021, 6:22 AMfull-keyboard-92367
09/22/2021, 6:27 AMyou need to addya i tried that right now, uvicorn reload doesn't work even if its set toto theproject1
on the BUILD filedependencies=
True
, I guess, because pants run on a sandbox, what I'm changing locally doesn't affect the sandbox.
But uvicorn does detect changes in my file and reloads itself, never gets reflected though.