mirror of
https://github.com/containers/podman.git
synced 2025-08-06 19:44:14 +08:00
Provide examples for python podman API
Signed-off-by: Jhon Honce <jhonce@redhat.com> Closes: #870 Approved by: rhatdan
This commit is contained in:
10
contrib/python/examples/eg_image_list.py
Normal file
10
contrib/python/examples/eg_image_list.py
Normal file
@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Example: Show all images on system."""
|
||||
|
||||
import podman
|
||||
|
||||
print('{}\n'.format(__doc__))
|
||||
|
||||
with podman.Client() as client:
|
||||
for img in client.images.list():
|
||||
print(img)
|
Reference in New Issue
Block a user