The following snippets are some common options for using Poetry for Python.
Use Poetry with the show command and --outdated/-o flag:
poetry show -o
This will show a list of outdated packages, eg.:
vscode@fbd3365ff171 /code (main*) $ poetry show -o
boltons 21.0.0 23.0.0 When they're not builtins, they're boltons.
devtools 0.10.0 0.11.0 Python's missing debug print command, and more.
glom 22.1.0 23.3.0 A declarative object transformer and formatter, for conglomerating nested data.
httpcore 0.16.3 0.17.0 A minimal low-level HTTP client.
pandas 1.5.3 2.0.0 Powerful data structures for data analysis, time series, and statistics
rfc3986 1.5.0 2.0.0 Validating URI References per RFC 3986
typeguard 2.13.3 3.0.2 Run-time type checker for Python
NOTE: This will show all outdated packages, not just the top level packages. Currently there is a PR to add a --top-level flag but it is not currently merged. A work around is:
poetry show --outdated | grep --file=<(poetry show --tree | grep '^\w' | sed 's/^\([^ ]*\).*/^\1/')
To show the installed packages with a dependency tree, use the show command with the --tree flag:
poetry show --tree