question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invoke from command line via python -m uvicorn

See original GitHub issue

Would 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:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
retniktcommented, Oct 19, 2019

I want to write a PR for this because:

  • I tried to use python -m uvicorn in a PyCharm Python run configuration, like @Diaoul pointed out
  • I found that uvicorn had no __main__.py
  • I tried to use python -m uvicorn.main but encountered this annoying warning
  • I found this issue and want to resolve it

However, I just wanted to check if this is actually open. The last comment says

Okay, probably happy to accept a pull request for this.

but the issue is closed.

0reactions
tomchristiecommented, Jun 16, 2019

Okay, probably happy to accept a pull request for this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found