Hacker News new | ask | show | jobs
by seanhunter 871 days ago
I've been using rye for all of my python projects and it has generally been great. There's a slightly annoying piece at the beginning when you first set up a project because "rye init" doesn't actually produce a valid empty project - you have to add a few lines to pyproject.toml, but it certainly beats a lot of the other things I've used.
1 comments

How does Rye compare to Poetry?
Here's a handy Venn diagram which shows where Rye currently sits in the ecosystem: https://alpopkes.com/posts/python/figures/venn_diagram.png

Poetry and Rye mostly do the same things, but Rye additionally does Python version management. I was personally recently reminded* that not only should one use dedicated environments for their projects, but also lock their specific Python versions.

I've used Rye so far for Python/package/env management, and it does the job just fine.

* (I upgraded from Fedora 38 to Fedora 39, which also bumped the system Python version from 3.11 to 3.12. And all of my virtual environments said boom.) :')

I adamantly believe that software projects should never rely on system dependencies. It’s just a totally broken concept and fundamentally bad idea, imho.
Way faster to do dependency resolution for one. It also uses ruff for linting which is crazy fast also. So all in all it’s a better and more productive dev experience as far as I’m concerned. Ig also encourages you to lock down specific versions of python whuch helps prevent catastrophic dependency problems on system upgrades.

Otoh it’s definitely newer and there are still rough edges from time to time.

I think Rye and Poetry offer very similar user experiences very well, but for me what makes Rye really special is that it is just using python standard tools.

If I start a new project using Poetry, every contributor will need to install and use Poetry, since it breaks a lot of Python standards and has its own syntax for things like package version dependencies.

If i start using Rye, nobody else has to use Rye unless they want to, the project just has a: - requirements-dev.lock and requirements.lock file - pyproject.toml file - that's it.