podman
Bindings for Podman RESTful API
What it is and what it does
Podman is a Python library that wraps the Podman container engine's RESTful API, letting you interact with containers and images from Python code instead of shell commands. It connects to a running Podman daemon (typically via a Unix socket) and provides object-oriented access to list, inspect, create, and manage containers and images. The library depends on requests, tomli, and urllib3 for HTTP communication and configuration parsing.
You use it by instantiating a PodmanClient with a URI pointing to your Podman daemon, then calling methods on that client to query or manipulate containers and images. The example in the documentation shows retrieving version info, listing images, iterating over containers, and checking their status. It's designed for developers who want to automate container operations from Python rather than shelling out to the Podman CLI.
Use it for:
- Automate container lifecycle management (start, stop, remove) from Python applications or scripts
- Build container orchestration or monitoring tools that query Podman daemon state programmatically
- Integrate container operations into CI/CD pipelines or deployment automation written in Python
- Query container and image metadata (status, IDs, attributes) without parsing CLI output
- Develop testing frameworks that spin up and tear down containers on demand via Python code
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides Python bindings to the Podman container engine's RESTful API, allowing you to manage containers, images, and other Podman resources programmatically.
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, uses a permissive Apache 2.0 license, and supports current Python versions (3.9–3.13). Install it if you need programmatic control over Podman from Python; skip it if you only use Podman via the CLI or don't need container automation in your codebase.
Install
podman on PyPI
pip
pip install podmanuv
uv add podmanpoetry
poetry add podmanInstalling podman
Before you install
Low install friction with a pure-Python wheel distribution. Maintenance is active with a recent release and ongoing repository activity.
License in practice
Licensed under Apache License 2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and license inclusion.
Quickstart
pip install podman
from podman import PodmanClient
uri = "unix:///run/user/1000/podman/podman.sock"
with PodmanClient(base_url=uri) as client:
version = client.version()
for image in client.images.list():
print(image)
Requires a running Podman daemon accessible via Unix socket or TCP; the package currently supports Unix domain sockets only.
Verify before relying
- Whether TCP connection support is planned or available in versions beyond 5.8.0
- Performance characteristics and latency overhead compared to direct Podman CLI invocation
- Compatibility matrix with specific Podman daemon versions
Package facts
| License | Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — requests, tomli, urllib3 |
| Maintenance | actively maintained — 142 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 706,658/month — #5,272 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: podman-5.8.0-py3-none-any.whl
Keywords: libpod, podman
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
dockerA Python library that lets you programmatically…
permissive · top 1,000 on PyPI
podman-composePodman Compose runs Docker Compose…
copyleft · top 15,000 on PyPI
docker-pyA Python client library that lets you control…
permissive · top 5,000 on PyPI
stackit-resourcemanagerProvides Python API bindings to manage STACKIT…
permissive · top 15,000 on PyPI
opentelemetry-resourcedetector-kubernetesDetects and populates OpenTelemetry Resource…
permissive · top 5,000 on PyPI
splunk-sdkProvides a Python client library for…
permissive · top 5,000 on PyPI
pylxdpylxd provides a Python interface to the LXD…
permissive · top 15,000 on PyPI
llm-sandboxExecutes code generated by large language…
unclear · top 15,000 on PyPI
pytest-containerA pytest plugin that automates container…
copyleft · top 15,000 on PyPI
azure-mgmt-appcontainersProvides a Python client library for managing…
permissive · top 5,000 on PyPI