LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

poetry-new

Create new Python project structure

TLDR

Create new project
$ poetry new [project-name]
copy
Create with specific source directory
$ poetry new --src [project-name]
copy
Create with custom name
$ poetry new --name [package-name] [directory]
copy

SYNOPSIS

poetry new [options] path

DESCRIPTION

poetry new scaffolds a new Python project directory with a standard structure including pyproject.toml, a package directory, and a tests directory. This provides a ready-to-use project layout.The --src flag uses the `src/` layout pattern where the package lives under a `src/` subdirectory. The --name option allows the package name to differ from the directory name. For adding Poetry to an existing project, use poetry init instead.

PARAMETERS

PATH

Project directory path.
--name NAME
Package name.
--src
Use src layout.
--readme FORMAT
Readme format (md, rst).

CAVEATS

Creates new directory. Use poetry init for existing projects.

HISTORY

poetry new provides project scaffolding for new Python packages.

SEE ALSO

Copied to clipboard
Kai