Post #694565
2026-02-04 01:48 UTC
@tlohde if your "little command line" is reasonable to do in 1 file, then you don't need a "module" (the empty __init__.py file). You can just use "uv init --script file.py" to get the boilerplate.
As for typer vs click -- that's a preference, mostly depending on how comfortable you are with python types. Those are both not part of the standard library, so you'll want to specifically add them: "uv add --script file.py typer". The uv docs[1] do a good job of covering this. (Also, uv can integrate with jupyter[2] in case that makes transitions easier for you.)
[1]: https://docs.astral.sh/uv/guides/scripts/#running-a-script-with-dependencies
[2]: https://docs.astral.sh/uv/guides/integration/jupyter/
Replies (0)
No replies.