podman-py
podman-py copied to clipboard
List tags parameter on images search method
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.