Skip to main content

A library to interact with a Podman server

Project description

podman - pythonic library for working with varlink interface to Podman

Build Status PyPI PyPI - Python Version PyPI - Status

Status: Active Development

See libpod


Python podman library.

Provide a stable API to call into.



  • Python 3.5+
  • OpenSSH 6.7+
  • Python dependencies in requirements.txt


From pypi

Install python-podman to the standard location for third-party Python modules:

python3 -m pip install podman

To use this method on Unix/Linux system you need to have permission to write to the standard third-party module directory.

Else, you can install the latest version of python-podman published on pypi to the Python user install directory for your platform. Typically ~/.local/. (See the Python documentation for site.USER_BASE for full details.) You can install like this by using the --user option:

python3 -m pip install --user podman

This method can be useful in many situations, for example, on a Unix system you might not have permission to write to the standard third-party module directory. Or you might wish to try out a module before making it a standard part of your local Python installation. This is especially true when upgrading a distribution already present: you want to make sure your existing base of scripts still works with the new version before actually upgrading.

For further reading about how python installation works you can read this documentation.

By building from source

To build the podman egg and install as user:

cd ~/python-podman
python3 clean -a && python3 sdist bdist
python3 install --user

Code snippets/examples:

Show images in storage

import podman

with podman.Client() as client:
  list(map(print, client.images.list()))

Show containers created since midnight

from datetime import datetime, time, timezone

import podman

midnight = datetime.combine(, time.min, tzinfo=timezone.utc)

with podman.Client() as client:
    for c in client.containers.list():
        created_at = podman.datetime_parse(c.createdat)

        if created_at > midnight:
            print('Container {}: image: {} created at: {}'.format(
      [:12], c.image[:32], podman.datetime_format(created_at)))


  • Fix pypi deployment by using documentation at markdown format


  • Fix up pushing to pypi


  • Pull image function throws KeyError for id
  • Secure Travis
  • Introduce travis-ci and autodeployments on tags
  • Improve packaging by using PBR
  • Add base requirements to
  • Remove pypodman to python-pypodman repo
  • Update module to align with varlink API changes
  • Use GetVersion instead of Ping, as recommended
  • Improve README
  • pypodman: add options to handle ssh host keys
  • Update
  • add missing bits
  • Initial copy from containers/libpod
  • Initial commit

Anders F Björklund Brent Baude Daniel J Walsh Dhanisha Phadate Hervé Beraud Jhon Honce Jhon Honce

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for podman, version 1.6.0
Filename, size File type Python version Upload date Hashes
Filename, size podman-1.6.0-py2.py3-none-any.whl (22.7 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size podman-1.6.0.tar.gz (28.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page