$npx skillfedfor your agent

python-on-whales

A Docker client for Python, designed to be fun and intuitive!

Worth itPyPI Build ToolsReleased Mar 202612.8M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_on_whales-0.81.0-py3-none-any.whl
v0.81.0 · released 2026-03-09 · Python <4,>=3.8 · 2 runtime deps: pydantic, typing-extensions

Yes. The package has low install friction, active maintenance, no known vulnerabilities, and a permissive MIT License. It solves a real problem—making Docker operations accessible and type-safe from Python—and is well-positioned for automation, testing, and CI/CD use cases. Install it if you need to orchestrate Docker from Python code.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Docker or Podman to be installed and running on the system; Python 3.8 or above.
  • Low install friction with only two lightweight runtime dependencies (pydantic and typing-extensions).
  • Active maintenance with recent commits and steady releases since 2020.

License · maintenance · safety

permissive license (permissive) — MIT License permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations.

last release 2026-03-09 (158 days) · last repo commit 2026-06-27 · 709 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 12,831,777 downloads/mo, #1,303 on PyPI

Verify before relying

pip install python-on-whales

from python_on_whales import docker

output = docker.run("hello-world")
print(output)
  • Whether the package supports Podman as a full alternative to Docker or only partial compatibility.
  • Performance characteristics when managing large numbers of containers or images.
  • Full scope of Docker Compose features supported through the python-on-whales API.
Same gist for agents: .md · .json

What it is and what it does

python-on-whales is a Python wrapper around the Docker CLI that translates Docker commands into intuitive Python method calls. Instead of shelling out to docker run or docker build, you call methods directly from Python code like run(), build(), pull(), and compose operations. It handles container lifecycle management, image operations, volume creation, networking, and Docker Compose orchestration.

The package is designed as a thin, direct mapping of Docker CLI operations to Python, so developers familiar with Docker commands can immediately recognize the equivalent Python calls. It depends on pydantic and typing-extensions for data validation and type hints, and requires Docker or Podman to be installed separately on the host system. The API returns Python objects that can be used as context managers to ensure cleanup, making it suitable for automation scripts, testing frameworks, and CI/CD pipelines.

Use it for

  • Automate container lifecycle in Python test suites by spinning up, configuring, and tearing down containers programmatically.
  • Build and push Docker images from Python scripts without subprocess calls or shell escaping.
  • Orchestrate multi-container applications using Docker Compose from Python code.
  • Copy files between host and containers, manage volumes, and inspect running containers in deployment automation.
  • Integrate GPU-enabled containers into Python applications with native parameter passing.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package has low install friction, active maintenance, no known vulnerabilities, and a permissive MIT License. It solves a real problem—making Docker operations accessible and type-safe from Python—and is well-positioned for automation, testing, and CI/CD use cases. Install it if you need to orchestrate Docker from Python code.

Install

python-on-whales on PyPI

Before you install

Low install friction with only two lightweight runtime dependencies (pydantic and typing-extensions). Active maintenance with recent commits and steady releases since 2020.

Requires Docker or Podman to be installed and running on the system; Python 3.8 or above.

License in practice

MIT License permits unrestricted use, modification, and distribution in both open-source and proprietary projects with minimal obligations.

Quickstart

pip install python-on-whales

from python_on_whales import docker

output = docker.run("hello-world")
print(output)

Verify before relying

  • Whether the package supports Podman as a full alternative to Docker or only partial compatibility.
  • Performance characteristics when managing large numbers of containers or images.
  • Full scope of Docker Compose features supported through the python-on-whales API.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release <4,>=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
pydantictyping-extensions
MaintenanceActively maintained 158 days since the last release
Last repo commit
First released
Downloads12,831,777 / month, #1,303 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14

Evidence: python_on_whales-0.81.0-py3-none-any.whl

Tags

Capabilities
docker client pythonpython docker api wrapperdocker container management pythondocker compose automationpythonic docker clidocker build run pull pythoncontainer orchestration python
Topics
docker-automationcontainer-orchestrationdevops-tooling

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “docker client python”

  • python-on-whalesA Python Docker client that wraps the Docker CLI with an intuitive,…
  • docker-pyA Python client library that lets you control Docker containers,…
  • aiodockerProvides async/await bindings for the Docker HTTP API, letting you…

Give your agent the search over MCP, or paste the wish link into any chat.

More Build Tools packages

packaging Worth it
PyPI · Build Tools · released Aug 2026

Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.

Apache-2.0 OR BSD-2-Clausepure Python · 3.9+
2.2Bdownloads / mo
tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
pip Worth it
PyPI · Build Tools · released Aug 2026

pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.

MITpure Python · 3.10+
617.5Mdownloads / mo
hatchling Worth it
PyPI · Python Modules · released Aug 2026

Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.

MITpure Python · 3.10+
484.2Mdownloads / mo
grpcio-tools Worth it
PyPI · Build Tools · released Jul 2026

Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.

Apache-2.0compiled wheel · 3.10+
278.2Mdownloads / mo
pre-commit Worth it
PyPI · Build Tools · released Aug 2026

pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.

Install it if your team needs consistent, automated validation at commit time.

permissive licensepure Python · 3.10+
179.9Mdownloads / mo

See also docker-py · awslambdaric · dockerfile · docker-image-py · pulumi-docker-build · testcontainers-postgres · pg0-embedded · azure-containerregistry · docker-compose · fspath