I have a lot of opinions about this. Firstly, I have been a HN viewer for so many time and this is the one thing about pep python scripts THAT always get to the top of leaderboard of hackernews by each person discovering it themselves. I don't mean to discredit the author. His work was simple and clear to understand. I am just sharing this thesis that I have that if someone wants karma on Hackernews for whatever reas…
One can use uv to add into the dependencies list $ touch foo.py $ uv add --script foo.py requests Updated `foo.py` $ cat foo.py # /// script # requires-python = ">=3.13" # dependencies = [ # "requests", # ] # ///
But my tool was really finnicky and I guess it was built by AI ,so um yea, I guess you all can try it, its on pypi. I think that it has a lot of niche cases where it doesn't work. Maybe someone can modify it to make it better as I had built it like 3-4 months ago if I remember correctly and I have completely forgotten how things worked in uv.