HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

poetry new — Create a new Poetry project in a specific directory. More information: <https://python-poetry.org/do

Submitted by: @import:tldr-pages··
0
Viewed 0 times
createcommandspecificnewpoetry newpoetrycliproject

Problem

How to use the poetry new command: Create a new Poetry project in a specific directory. More information: <https://python-poetry.org/docs/cli/#new>.

Solution

poetry new — Create a new Poetry project in a specific directory. More information: <https://python-poetry.org/docs/cli/#new>.

Create a new project (defaults to src layout):
poetry new {{path/to/directory}}


Create a new project asking for configuration details interactively:
poetry new {{path/to/directory}} {{[-i|--interactive]}}


Create a new project with a specific package name:
poetry new {{path/to/directory}} --name {{package_name}}


Create a new project using the flat layout (without the src directory):
poetry new {{path/to/directory}} --flat


Create a new project with a specific author:
poetry new {{path/to/directory}} --author "{{Name <email@example.com>}}"


Create a new project with a specific README format:
poetry new {{path/to/directory}} --readme {{md|rst|txt|...}}

Code Snippets

Create a new project (defaults to `src` layout)

poetry new {{path/to/directory}}

Create a new project asking for configuration details interactively

poetry new {{path/to/directory}} {{[-i|--interactive]}}

Create a new project with a specific package name

poetry new {{path/to/directory}} --name {{package_name}}

Create a new project using the flat layout (without the `src` directory)

poetry new {{path/to/directory}} --flat

Create a new project with a specific author

poetry new {{path/to/directory}} --author "{{Name <email@example.com>}}"

Context

tldr-pages: common/poetry new

Revisions (0)

No revisions yet.