For those who don’t already know, Poetry is a dependency and environment manager for Python. An alternative to the infamous Pipenv, it takes care of your project’s libraries, sorts out virtual environments and can help when packaging and publishing your code to PyPI. I’ve written another article outlining why I think it’s better than Pipenv, but here you’ll find out how to actually use it.

Pipenv uses the install sub-command for both adding dependencies and making sure your environment is up-to-date with what’s specified. Poetry instead splits this out into two sub-commands: add for adding dependencies (no way?!) and install for keeping your environment in-check.

Related Articles