From 74ccd9ce5f29a1df4ffe70b4d8bd00c29d5d9d15 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Thu, 12 Jul 2018 19:26:14 -0700 Subject: Update python directories to better support setup.py Signed-off-by: Jhon Honce --- contrib/python/podman/examples/eg_inspect_fedora.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 contrib/python/podman/examples/eg_inspect_fedora.py (limited to 'contrib/python/podman/examples/eg_inspect_fedora.py') diff --git a/contrib/python/podman/examples/eg_inspect_fedora.py b/contrib/python/podman/examples/eg_inspect_fedora.py new file mode 100644 index 000000000..b5bbba46d --- /dev/null +++ b/contrib/python/podman/examples/eg_inspect_fedora.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +"""Example: Pull Fedora and inspect image and container.""" + +import podman + +print('{}\n'.format(__doc__)) + +with podman.Client() as client: + id = client.images.pull('registry.fedoraproject.org/fedora:28') + img = client.images.get(id) + print(img.inspect()) + + cntr = img.create() + print(cntr.inspect()) + + cntr.remove() -- cgit v1.2.3-54-g00ecf