Bindings for Podman RESTful API
Project Links
Meta
Author: Brent Baude, Urvashi Mohnani
Requires Python: >=3.9
Classifiers
Development Status
- 5 - Production/Stable
Intended Audience
- Developers
License
- OSI Approved :: Apache Software License
Operating System
- OS Independent
Programming Language
- Python :: 3 :: Only
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
Topic
- Software Development :: Libraries :: Python Modules
podman-py
This python package is a library of bindings to use the RESTful API of Podman. It is currently under development and contributors are welcome!
Installation
pip install podman
Documentation: https://podman-py.readthedocs.io/en/latest/
Source Code: https://github.com/containers/podman-py
Dependencies
- For runtime dependencies, see [dependencies] in pyproject.toml
- For testing and development dependencies, see [project.optional.dependencies] in pyproject.toml
- The package is split in [progress_bar], [docs], and [test]
Example usage
"""Demonstrate PodmanClient."""
import json
from podman import PodmanClient
# Provide a URI path for the libpod service. In libpod, the URI can be a unix
# domain socket(UDS) or TCP. The TCP connection has not been implemented in this
# package yet.
uri = "unix:///run/user/1000/podman/podman.sock"
with PodmanClient(base_url=uri) as client:
version = client.version()
print("Release: ", version["Version"])
print("Compatible API: ", version["ApiVersion"])
print("Podman API: ", version["Components"][0]["Details"]["APIVersion"], "\n")
# get all images
for image in client.images.list():
print(image, image.id, "\n")
# find all containers
for container in client.containers.list():
# After a list call you would probably want to reload the container
# to get the information about the variables such as status.
# Note that list() ignores the sparse option and assumes True by default.
container.reload()
print(container, container.id, "\n")
print(container, container.status, "\n")
# available fields
print(sorted(container.attrs.keys()))
print(json.dumps(client.df(), indent=4))
Contributing
See CONTRIBUTING.md
5.8.0
Mar 25, 2026
5.7.0
Jan 21, 2026
5.6.0
Sep 05, 2025
5.5.0
Jun 18, 2025
5.4.0.1
Feb 19, 2025
5.4.0
Feb 19, 2025
5.2.0
Sep 18, 2024
5.0.0
Mar 22, 2024
4.9.0
Jan 22, 2024
4.8.2
Jan 03, 2024
4.8.1
Dec 21, 2023
4.8.0.post1
Nov 29, 2023
4.7.0
Sep 27, 2023
4.6.0
Jul 24, 2023
4.5.1
May 31, 2023
4.5.0
Apr 27, 2023
4.4.1
Feb 21, 2023
4.4.0
Feb 09, 2023
4.3.0
Oct 21, 2022
4.2.0
Aug 10, 2022
4.0.1
Oct 06, 2022
4.0.0
Feb 28, 2022
3.2.1
Sep 21, 2021
3.2.0
Jul 15, 2021
3.1.2.4
May 20, 2021
1.6.0
Oct 11, 2019
0.12.0
Jul 01, 2019
0.11.1.1
May 28, 2019
0.0.3
Jul 09, 2019
3.1.2.4.linux
May 20, 2021