πŸ’­ Lazy self-installing Python scripts with uv ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ !https://treyhunner.com/2024/12/lazy-self-installing-python-scripts-with-uv/ Date: December 24, 2024 Image: Lazy self-installing Python scripts with uv β€” I frequently find myself writing my own short command-line scripts in Python that help me with day-to-day tasks. It’s so easy to throw together … Lazy self-installing Python scripts with uv I frequently find myself writing my own short command-line scripts in Python that help me with day-to-day tasks. It’s so easy to throw together … treyhunner.com I really like Trey’s steps to making an executable python script with uv his old process seems to be the same with a new shebang β”‚ 1. Add an appropriate shebang line above the first line in the file (e.g. #!/usr/bin/env python3) β”‚ 2. Aet an executable bit on the file (chmod a+x my_script.py) β”‚ 3. Place the script in a directory that’s in my shell’s PATH variable (e.g. cp my_script.py ~/bin/my_script) And here is the new format the the shebang followed by the metadata comment block defined in PEP 723. [code] #!/usr/bin/env -S uv run --script # /// script # requires-python = ">=3.12" # dependencies = [ # "ffmpeg-normalize", # ] # /// NOTE β”‚ This post is a thought </thoughts/>. It’s a short note that I make about someone else’s content online #thoughts </tags/thoughts/>