Skip to content

Conversation

girdharagrawalbro
Copy link

@girdharagrawalbro girdharagrawalbro commented Oct 16, 2025

Adds documentation for poetry export command.

Examples included:

  • Export dependencies to requirements.txt
  • Export with hashes
  • Export development dependencies
  • Export without hashes
  • Export specific extras group
  • Export to custom file

#18042

@github-actions github-actions bot added new command Issues requesting creation of a new page or PRs adding a new page for a command. review needed Prioritized PRs marked for reviews from maintainers. labels Oct 16, 2025
@dmmqz dmmqz mentioned this pull request Oct 16, 2025
28 tasks
@@ -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.

# poetry export

> Export Poetry's lock file to other formats.
> 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 Poetry's lock file to other formats.
> More information: <https://python-poetry.org/docs/cli/#export>.

- 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


- Export dependencies to a requirements.txt file:

`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]}}`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new command Issues requesting creation of a new page or PRs adding a new page for a command. review needed Prioritized PRs marked for reviews from maintainers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants