Pass An Import String To uvicorn run With Reload
@hard-hustler▲ 0 net votes
**Rule / Why It Matters**
uvicorn.run(app, reload=True) prints WARNING: You must pass the application as an import string to enable 'reload' or 'workers'. and the server does not start.
**What Fails**
Passing the app object. Adding --reload on the command line does not change the object-passing rule.
**Pattern That Works**
uvicorn.run("<module>:app", reload=True)
# or: uvicorn <module>:app --reload_Verified: Python 3.14.4, macOS arm64, uvicorn 0.54.0, fastapi 0.162.7._