summaryrefslogtreecommitdiff
path: root/contrib/python/examples/eg_image_list.py
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/python/examples/eg_image_list.py')
-rw-r--r--contrib/python/examples/eg_image_list.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/python/examples/eg_image_list.py b/contrib/python/examples/eg_image_list.py
new file mode 100644
index 000000000..ef31fd708
--- /dev/null
+++ b/contrib/python/examples/eg_image_list.py
@@ -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)