Invoke from command line via python -m uvicorn
See original GitHub issueWould this be a good idea? It is as simple as creating a uvicorn/__main__.py
with:
if __name__ == "__main__":
from .main import main
main()
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Deployment - Uvicorn
Typically you'll run uvicorn from the command line. ... The ASGI application should be specified in the form path.to.module:instance.path . When running locally, ......
Read more >uvicorn is not working when called from the terminal
i recently install fastapi,uvicorn and tried to run. uvicorn main:app --reload. I am using zsh (shell type does not matter) and pyenv for ......
Read more >How to install uvicorn in Python | bobbyhadz
To install the uvicorn module on Windows: Type CMD in the search bar and open the Command Prompt application. Type pip install uvicorn...
Read more >Easy FastAPI Setup - deadbearcode
Setup a basic FastAPI application, with auto generated docs and request ... This is the app referred to in the command to start...
Read more >Uvicorn — Docker FastAPI projects 0.0.2 documentation
Ok, but why on earth do we need to type in CMD python -m uvicorn main:app --host 0.0.0.0 --port 80 in our Dockerfile...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I want to write a PR for this because:
python -m uvicorn
in a PyCharm Python run configuration, like @Diaoul pointed out__main__.py
python -m uvicorn.main
but encountered this annoying warningHowever, I just wanted to check if this is actually open. The last comment says
but the issue is closed.
Okay, probably happy to accept a pull request for this.