Skip to content

Commit 6eb2a79

Browse files
shellydavidacuteenvydmmqz
authored
poetry-{cache, list, lock, show}: add page (#18229)
Co-authored-by: Lena <126529524+acuteenvy@users.noreply.github.com> Co-authored-by: Dylan <145150333+dmmqz@users.noreply.github.com>
1 parent a4def4a commit 6eb2a79

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

pages/common/poetry-cache.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# poetry cache
2+
3+
> Manage Poetry's cache.
4+
> See also: `asdf`.
5+
> More information: <https://python-poetry.org/docs/cli/#cache>.
6+
7+
- Display Poetry's available caches:
8+
9+
`poetry cache list`
10+
11+
- Remove all packages from a cache (e.g.: PyPI):
12+
13+
`poetry cache clear PyPI --all`
14+
15+
- Remove a specific package from a cache (Note: must be in format `cache:package:version`):
16+
17+
`poetry cache clear {{pypi}}:{{requests}}:{{2.24.0}}`

pages/common/poetry-list.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# poetry list
2+
3+
> List available Poetry commands.
4+
> See also: `asdf`.
5+
> More information: <https://python-poetry.org/docs/cli/#list>.
6+
7+
- List all available Poetry commands:
8+
9+
`poetry list`
10+
11+
- List commands for a specific namespace:
12+
13+
`poetry list {{namespace}}`

pages/common/poetry-lock.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# poetry lock
2+
3+
> Lock dependencies in `pyproject.toml` (without installing them).
4+
> See also: `asdf`.
5+
> More information: <https://python-poetry.org/docs/cli/#lock>.
6+
7+
- Lock dependencies from the current directory's `pyproject.toml` file:
8+
9+
`poetry lock`
10+
11+
- Regenerate the existing lock file:
12+
13+
`poetry lock --regenerate`

pages/common/poetry-show.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# poetry show
2+
3+
> Show details of packages in your Poetry project.
4+
> See also: `asdf`.
5+
> More information: <https://python-poetry.org/docs/cli/#show>.
6+
7+
- Display all packages:
8+
9+
`poetry show`
10+
11+
- Show details of a specific package:
12+
13+
`poetry show {{package_name}}`
14+
15+
- Show details as a dependency tree:
16+
17+
`poetry show {{[-t|--tree]}}`
18+
19+
- Only show top-level packages (those explicitly defined in `pyproject.toml`):
20+
21+
`poetry show {{[-T|--top-level]}}`
22+
23+
- Show outdated packages:
24+
25+
`poetry show {{[-o|--outdated]}}`
26+
27+
- Show the latest versions for all packages:
28+
29+
`poetry show {{[-l|--latest]}}`
30+
31+
- Exclude a specific dependency group/s:
32+
33+
`poetry show --without {{group1,group2,...}}`
34+
35+
- Only show a specific dependency group/s:
36+
37+
`poetry show --only {{group1,group2,...}}`

0 commit comments

Comments
 (0)