containers.list() gathers too much data
I'm facing an issue with the simplest possible API call that I could think about
with podman.Client() as client: ...: list(client.containers.list())
which on my setup, with one single container running, takes in the 2 minutes
This issue was first opened in the plain podman repo https://github.com/containers/libpod/issues/4656
in that issue we have established that this mundane API call actually gathers information about disk space, which in this particular instance I do not need at all, but that slows things down terribly; the fact that 2 minutes are needed here is clearly a concern too, but should be taken separately
bottom line, I would like to know if there is currently a way to quickly obtain a simple list of containers, with minimal - even if quite incomplete - attached information;
FYI here's how it's done in docker:
https://docker-py.readthedocs.io/en/stable/containers.html#docker.models.containers.ContainerCollection.list
where the list() method accepts a sparse parameter
IMHO having all calls to list() perform deep inspection of the subject containers makes it mostly unusable, do you not agree with that ?
hi a few months back my understanding was there were plans to move to a new generation of the API, that would make this issue essentially obsolete
so just checking in, are there any updates that you guys would like to share ?
thank you
The first versions are available in podman 1.9.2 and you can play with it there.
Python bindings should be being worked on in https://github.com/containers/podman-py. We would love to get contributors working on it.
thanks for the update, great news indeed, will give it a try at the next opportunity !
hi again
just to make sure I got it right; I just upgraded to Fedora 32, I can see version 1.9.1
# rpm -q podman
podman-1.9.1-1.fc32.x86_64
I take it version 1.9.2 is about to be published, right ?
also as far as the python wrapper, is there an rpm (preferred) or should I pip install from the git clone directly ?
thanks !