Poetry is a dependency management tool for python. Similar to pip, you can use poetry to install and manage dependencies in your python project.
Poetry also has built-in support for packaging your python app and releasing it to PyPi (or to any other private repository). As of Mar 22, 2021, poetry is compatible with python3.5+ and supports Linux, OSX & Windows operating systems.
If you have tried packaging your app to release on PyPi, you must know the annoying process of manually creating the setup files. Well, poetry eliminates it (or... just makes it easier).
Other than that, poetry also removes the dependency of manually creating and updating the requirements.txt. Poetry does the package management with commands similar to npm and stores the package setup info and dependencies pyproject.toml file.
Long story short, with Poetry :
Poetry can be installed on Windows, Linux, OSX systems. We will install poetry on Linux for now.
Note : Make sure you have latest version of python installed on your system before proceeding ahead with the tutorial.
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
You can also install poetry using pip. But since I find poetry much easier to use, I will recommend using the previous step.
If that did not convince you and you still want to install poetry with pip, run the following command :
pip install --user poetry
and you are done! Woohoo!
© 2021, All Rights Reserved · Vipin Joshi