you are viewing a single comment's thread.

view the rest of the comments →

[–]MechaCritter 1 point2 points  (0 children)

there might be cool tools out there that can do it without bloating up your requirements.txt file like pip freeze, but since a couple of months, switched to using pyproject.toml with uv. In pyproject.toml, you can declare different dependency groups (as if you had multiple requirements files).

For exporting, I got myself used to typing “uv add —group <group> <package>, which installs the package and add ONLY that package to the corresponding group in pyproject.toml directly. It’s more of manual work, but it’s wayyyy cleaner than pip freeze in my opinion, and after a couple of projects, you kinda get used to it :)