Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions pages/common/poetry-new.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# poetry new

> Create a new Python project with a standard project structure.
> More information: <https://python-poetry.org/docs/cli/#new>.

- Create a new project with the standard layout:

`poetry new {{project_name}}`

- Create a new project with a source layout (src/ directory):

`poetry new {{project_name}} --src`

Comment on lines +10 to +13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The src layout is the default, and I don't see this flag in the documentation.

Suggested change
- Create a new project with a source layout (src/ directory):
`poetry new {{project_name}} --src`

- Create a new project with a specific name (different from the directory):

`poetry new {{project_name}} --name {{package_name}}`

- Create a new project and include a README file in a specific format:

`poetry new {{project_name}} --readme {{md}}`

- Display help:

`poetry new --help`