mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-12 20:47:53 +00:00
31 lines
759 B
Plaintext
31 lines
759 B
Plaintext
---
|
|
syntax: markdown
|
|
tags: [tldr, common]
|
|
source: https://github.com/tldr-pages/tldr.git
|
|
---
|
|
# poetry add
|
|
|
|
> Add required packages to the `pyproject.toml` file in Poetry.
|
|
> See also: `asdf`.
|
|
> More information: <https://python-poetry.org/docs/cli/#add>.
|
|
|
|
- Add required packages:
|
|
|
|
`poetry add {{package_name}}`
|
|
|
|
- Add required packages to a specific group of dependencies:
|
|
|
|
`poetry add {{package_name}} --group {{group_name}}`
|
|
|
|
- Add a specific version of a package:
|
|
|
|
`poetry add {{package_name}}=={{version}}`
|
|
|
|
- Add a specific version of a package equal to or earlier than a given version:
|
|
|
|
`poetry add {{package_name}}<={{version}}`
|
|
|
|
- Add a specific version of a package equal to or later than a given version:
|
|
|
|
`poetry add {{package_name}}>={{version}}`
|