LinuxCommandLibrary

poetry

Manage Python packages and dependencies.

TLDR

Create a new Poetry project in the directory with a specific name

$ poetry new [project_name]
copy


Install a dependency and its subdependencies
$ poetry add [dependency]
copy


Install a development dependency and its subdependencies
$ poetry add --group dev [dependency]
copy


Interactively initialize the current directory as a new Poetry project
$ poetry init
copy


Get the latest version of all dependencies and update poetry.lock
$ poetry update
copy


Execute a command inside the project's virtual environment
$ poetry run [command]
copy


Bump the minor version of the project in pyproject.toml
$ poetry version minor
copy

Help

Description:
  Lists commands. 

Usage:
  list [options] [--] [

Arguments:
  namespace                  The namespace name 

Options:
  -h, --help                 Display help for the given command. When no command is given display help for the list command. 
  -q, --quiet                Do not output any message. 
  -V, --version              Display this application version. 
      --ansi                 Force ANSI output. 
      --no-ansi              Disable ANSI output. 
  -n, --no-interaction       Do not ask any interactive question. 
      --no-plugins           Disables plugins. 
      --no-cache             Disables Poetry source caches. 
  -C, --directory=DIRECTORY  The working directory for the Poetry command (defaults to the current working directory). 
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug. 

Help:
  The list command lists all commands: 
   
    poetry list 
   
  You can also display the commands for a specific namespace: 
   
    poetry list test 

Copied to clipboard