Skip to main content

A library to interact with a Podman server

Reason this release was yanked:

deprecated

Project description

podman - pythonic library for working with varlink interface to Podman

Status: Active Development

See libpod

Overview

Python podman library.

Provide a stable API to call into.

Releases

Requirements

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

Building

To build the podman egg and install as user:

cd ~/python-podman
python3 setup.py clean -a && python3 setup.py sdist bdist
python3 setup.py 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(datetime.today(), 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(
                c.id[:12], c.image[:32], podman.datetime_format(created_at)))

Project details


Download files

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

Source Distribution

podman-0.12.0.tar.gz (26.9 kB view hashes)

Uploaded Source

Built Distribution

podman-0.12.0-py2.py3-none-any.whl (21.8 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page