-
First and foremost, thank you so munch for developing this awesome library and I hope I don't bother you by opening this issue. The problem is that I can not use typer-cli command to run a function if it's importing other python scripts. Given the file structure and contents, the command
main.py import typer
from helloworld import print_hello
def greet():
print_hello()
if __name__ == "__main__":
typer.run(greet) helloworld.py def print_hello():
print("Hello World") output $typer main.py run
...
ModuleNotFoundError: No module named 'helloworld' |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I'm also having this issue. Did you end up finding a solution for it @NMZ0429 ? |
Beta Was this translation helpful? Give feedback.
-
Hello! This repo, I just tried your example with the latest version and it all seems to work well! 🎉 If it doesn't, please let me know more details in a question in Typer: https://github.com/tiangolo/typer/discussions/new?category=questions |
Beta Was this translation helpful? Give feedback.
Hello! This repo,
typer-cli
, is now integrated intotyper
, when you install withpip install typer
you get thetyper
command with everything. This is since Typer 0.12.1. 🚀I just tried your example with the latest version and it all seems to work well! 🎉
If it doesn't, please let me know more details in a question in Typer: https://github.com/tiangolo/typer/discussions/new?category=questions