Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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",
    # ]
    # ///


Thanks a lot friend, But one of the issues with this is that I need to know about requests and sometimes their names can be different and I actually had created a cli tool called uvman which actually wanted to automate that part too.

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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: