docker
A Python library for the Docker Engine API.
Decision gist · record as of 2026-08-14
Yes. This is a mature, widely-used library (top 1000 PyPI packages) with active maintenance, no vulnerabilities, and permissive licensing. Install it if you need to control Docker from Python code; it is the standard binding for that task.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Docker Engine to be installed and running on the system; the library communicates with the Docker daemon via socket or environment configuration.
- Low friction install with stable maintenance.
- Actively maintained (last commit 2026-08-13), in production use since 2016-12-12, and depends only on requests, urllib3, and pywin32.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), which allows commercial and private use with minimal restrictions—suitable for most projects without legal concern.
last release 2026-07-09 (36 days) · last repo commit 2026-08-13 · 7,209 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 182,793,672 downloads/mo, #226 on PyPI
Alternatives
Verify before relying
pip install docker
import docker
client = docker.from_env()
client.containers.run("ubuntu:latest", "echo hello world")- Whether pywin32 is required on all platforms or only Windows; the fact sheet does not clarify platform-specific dependency resolution.
What it is and what it does
Docker is a Python binding to the Docker Engine API that lets you automate container and image operations from within Python applications. Instead of shelling out to command-line tools, you import the library, connect to your local or remote Docker daemon, and call methods to run containers, pull images, manage networks, and orchestrate Swarms—all with the same capabilities as the CLI but integrated into your Python code.
The library requires Docker Engine to be running and accessible via socket or environment configuration. It depends on requests and urllib3 for HTTP communication, and pywin32 for Windows support. It supports Python 3.8, 3.9, 3.10, 3.11, and 3.12, and is actively maintained with no known security vulnerabilities.
Use it for
- Automate container deployment and lifecycle management in CI/CD pipelines without shelling out to command-line tools.
- Build testing frameworks that spin up isolated containers for each test run and clean them up afterward.
- Write orchestration scripts that manage multi-container applications, networks, and volumes programmatically.
- Monitor and inspect running containers, logs, and resource usage from within a Python monitoring tool.
- Integrate container operations into larger Python applications that need to provision or manage containerized services on demand.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is a mature, widely-used library (top 1000 PyPI packages) with active maintenance, no vulnerabilities, and permissive licensing. Install it if you need to control Docker from Python code; it is the standard binding for that task.
Install
docker on PyPI
Before you install
Low friction install with stable maintenance. Actively maintained (last commit 2026-08-13), in production use since 2016-12-12, and depends only on requests, urllib3, and pywin32. No known vulnerabilities.
Requires Docker Engine to be installed and running on the system; the library communicates with the Docker daemon via socket or environment configuration.
License in practice
Licensed under Apache-2.0 (permissive), which allows commercial and private use with minimal restrictions—suitable for most projects without legal concern.
Quickstart
pip install docker
import docker
client = docker.from_env()
client.containers.run("ubuntu:latest", "echo hello world")
Verify before relying
- Whether pywin32 is required on all platforms or only Windows; the fact sheet does not clarify platform-specific dependency resolution.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagespywin32requestsurllib3 |
| Maintenance | Actively maintained 36 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 182,793,672 / month, #226 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Other EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software DevelopmentTopic :: Utilities |
Evidence: docker-7.2.0-py3-none-any.whl
Tags
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 engine sdk”
- dockerA Python library that lets you programmatically control Docker—run…
- envtplRenders Jinja2 templates on the command line, substituting shell…
- shuffle-sdkShuffle SDK provides a framework for building, testing, and deploying…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also docker-py · podman · prefect-docker · tox-docker · testcontainers-core · dockerpty · docker-compose · exasol-integration-test-docker-environment · pylxd · spython