podman-py icon indicating copy to clipboard operation
podman-py copied to clipboard

List tags parameter on images search method

Open madhuravius opened this issue 2 years ago • 0 comments

I believe listTags (--list-tags equivalent on cli / api) is a flag that can be enabled on podman's api for the search behavior: https://docs.podman.io/en/latest/markdown/podman-search.1.html#list-tags

It would be nice to have this flag enabled so we can search for these tags in our results. I have a simple proof here of function below.

>>> from podman import PodmanClient
>>> import pprint as pp
>>> uri = "unix:///run/user/1000/podman/podman.sock"
>>> client = PodmanClient(base_url=uri)
>>> pp.pprint(client.images.search(term="docker.io/nginx", list_tags=True)[0:5])
[{'Automated': '',
  'Description': '',
  'Index': 'docker.io',
  'Name': 'docker.io/library/nginx',
  'Official': '',
  'Stars': 0,
  'Tag': '1'},
 {'Automated': '',
  'Description': '',
  'Index': 'docker.io',
  'Name': 'docker.io/library/nginx',
  'Official': '',
  'Stars': 0,
  'Tag': '1-alpine'},
...

I did not see a comparable issue opened for this.

madhuravius avatar Apr 29 '23 12:04 madhuravius