Home Poetry Commands
Post
Cancel

Poetry Commands

## Start a Project

create a project in new folder with the package name and the boilerplate
poetry new my-package
or
create the pyproject.toml in the current folder interactively poetry init

add a package to the project

poetry add requests pendulum

Upade the package

In order to get the latest versions of the dependencies and to update the poetry.lock file
poetry update requests toml

show the packages installed

poetry show

show the particular package dependencies

poetry show <package-name>

To export the requirements.txt

format can be ‘constrainst.txt’ or ‘requriements.txt’

poetry export -f requirements.txt --output requirements.txt

This post is licensed under CC BY 4.0 by the author.