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

> Search for packages on a remote index.
> Note: PyPI no longer supports searching via the command-line, so this command may fail on the default repository.
> More information: <https://python-poetry.org/docs/cli/#search>.
- Search for a package:

`poetry search {{package_name}}`

- Search for multiple packages:

`poetry search {{package1 package2 ...}}`
Comment on lines +7 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.

If searching the PyPI always fails (like pip search), then add an option to specify a custom index. It doesn't make sense to have examples that don't work.

Like in here:

- Search for packages using a custom package index:
`pip search {{[-i|--index]}} {{example.com}} {{query}}`

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

poetry search does not seem provide a way to modify where to search

> poetry search --help

Description:
  Searches for packages on remote repositories.

Usage:
  search [options] [--] <tokens>...

Arguments:
  tokens                     The tokens to search for.

Options:
  -h, --help                 Display help for the given command. When no command is given display help for the list command.
  -q, --quiet                Do not output any message.
  -V, --version              Display this application version.
      --ansi                 Force ANSI output.
      --no-ansi              Disable ANSI output.
  -n, --no-interaction       Do not ask any interactive question.
      --no-plugins           Disables plugins.
      --no-cache             Disables Poetry source caches.
  -P, --project=PROJECT      Specify another path as the project root. All command-line arguments will be resolved relative to the current working directory.
  -C, --directory=DIRECTORY  The working directory for the Poetry command (defaults to the current working directory). All command-line arguments will be resolved relative to the given directory.
  -v|vv|vvv, --verbose       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.

Also, as said in #18042 (comment), searching seem to work fine for now.