Python poetry
Poetry manage dependency, virtual environment, versioning
-config file: pyproject.toml
-create .venv folder with virtual environment files
Commands:
#show packages included:
poetry show
#add depedency
poetry add <pkgx>
#add a specific version:
poetry add requests@2.10.2
#add a version higher then specific version
poetry add requests^2.10.2
#add a version higher then specific version but not upper then minor version ( in our case 10)
poetry add requests^2.10.2
#remove dependency
poetry remove requests
#install all dependencies (from pyproject.toml)
poetry install
#if there is no specific root folder:
poetry install --no-root
#enter in virtual environment:
poetry shell
#increase version number of project:
poetry shell
(pyproject1) poetry version minor
Comentarii
Trimiteți un comentariu