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
28 changes: 28 additions & 0 deletions pages/common/poetry-export.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# poetry export

> Export Poetry's lock file to other formats.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
> Export Poetry's lock file to other formats.
> Export Poetry's lock file to other formats.
> Provided by the Export Poetry Plugin.

> More information: <https://python-poetry.org/docs/cli/#export>.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
> More information: <https://python-poetry.org/docs/cli/#export>.
> More information: <https://github.com/python-poetry/poetry-plugin-export#usage>.


- Export dependencies to a requirements.txt file:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- Export dependencies to a requirements.txt file:
- Export dependencies to a `requirements.txt` file:

https://github.com/tldr-pages/tldr/blob/main/contributing-guides/style-guide.md#special-cases


`poetry export --output {{requirements.txt}}`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`poetry export --output {{requirements.txt}}`
`poetry export {{[-o|--output]}} requirements.txt`

https://github.com/tldr-pages/tldr/blob/main/contributing-guides/style-guide.md#exceptions


- Export dependencies including development dependencies:

`poetry export --dev --output {{requirements-dev.txt}}`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`poetry export --dev --output {{requirements-dev.txt}}`
`poetry export --dev {{[-o|--output]}} {{requirements-dev.txt}}`


- Export dependencies without hashes:

`poetry export --without-hashes --output {{requirements.txt}}`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`poetry export --without-hashes --output {{requirements.txt}}`
`poetry export --without-hashes {{[-o|--output]}} {{requirements.txt}}`


- Export dependencies for a specific format:

`poetry export --format {{requirements.txt}} --output {{requirements.txt}}`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`poetry export --format {{requirements.txt}} --output {{requirements.txt}}`
`poetry export {{[-f|--format]}} {{requirements.txt|constraints.txt}} {{[-o|--output]}} {{requirements.txt}}`


- Export only specific dependency groups:

`poetry export --only {{main}} --output {{requirements.txt}}`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`poetry export --only {{main}} --output {{requirements.txt}}`
`poetry export --only {{main}} {{[-o|--output]}} {{requirements.txt}}`


- Display help:

`poetry export --help`
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
`poetry export --help`
`poetry export {{[-h|--help]}}`