Currently, there doesn't seem to be any way to access the information returned by docker-inspect via docker-py. This makes using docker-py for testing containers difficult, as there's no good way to inspect things like the exit codes that are in the inspect json.
Brilliant, I'd missed that. Since it directly mimics part of the docker CLI, is there a reason it's not in the high-level API?
@treuherz You can access the inspect data using the attrs attribute on all model objects (e.g. https://docker-py.readthedocs.io/en/stable/networks.html#docker.models.networks.Network.attrs)
Great, hadn't caught that before. Does this #1375 not still make that unreliable, though?
EDIT: I see Container has a reload() method for that purpose. Documentation on attrs is pretty lacking, though. Thanks for pointing it out.
Most helpful comment
You should dig deeper:
https://docker-py.readthedocs.io/en/stable/api.html#docker.api.container.ContainerApiMixin.inspect_container
https://docker-py.readthedocs.io/en/stable/api.html#docker.api.image.ImageApiMixin.inspect_image