--- id: docker-py version: "1.10.6" license: UNKNOWN license_treatment: permissive maintenance: active --- # docker-py — Python client for Docker. License: permissive · Maintenance: active · Downloads: 1.1M/mo ## What it is and what it does docker-py is a Python wrapper around the Docker Remote API that lets you manage containers, images, and other Docker resources from Python code instead of shell commands. It exposes the same operations available in the docker CLI—starting and stopping containers, pulling and pushing images, inspecting logs, managing networks—but as Python method calls. The library has no runtime dependencies, making it lightweight to install. The package is actively maintained and widely used (top 5000 on PyPI with over 1 million monthly downloads), though the latest release on PyPI dates to 2016. It carries no known security vulnerabilities and is licensed permissively under Apache 2.0, making it safe for commercial use. Use it for: - Automate container orchestration and lifecycle management (start, stop, restart) from Python applications. - Build deployment tools or CI/CD pipelines that programmatically manage Docker containers and images. - Monitor and inspect running containers, logs, and resource usage from Python monitoring scripts. - Pull and push Docker images to registries as part of automated build or release workflows. - Test Python applications by spinning up and tearing down containerized services in test suites. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. A Python client library that lets you control Docker containers, images, and services programmatically through the Docker Remote API instead of using the command line. Yes, if you need to control Docker from Python and your environment supports the Docker daemon. The library is lightweight, permissively licensed, and actively maintained. However, verify that this is still the recommended Docker client for your Python version—the latest PyPI release is from 2016, and the modern Docker Python client may have a different package name or location. ## Install pip install docker-py uv add docker-py poetry add docker-py ## Installing docker-py Before you install: Low install friction with no runtime dependencies. The package is actively maintained with recent commits, though the latest PyPI release dates to 2016-11-02; the repository itself shows ongoing activity as of 2026-08-13. License in practice: Licensed under Apache License, Version 2.0 (permissive), which allows commercial and private use with minimal restrictions—suitable for most projects. Quickstart: pip install docker-py import docker client = docker.Client() containers = client.containers() Requires a running Docker daemon accessible to the Python process; connection details may need configuration depending on your Docker setup. Verify before relying: - Whether this package is still the recommended Docker client for Python (the modern package may be named differently). - Current Python version support—classifiers list Python 2.6–3.5, but requires_python is unspecified and the latest release is from 2016. ## Package facts - License: UNKNOWN (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 1.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags docker python client, programmatic docker control, docker container management python, docker remote api python, automate docker with python, docker image pull push python, run containers from python, docker, container-orchestration, devops [View on SkillFed](https://skillfed.io/packages/docker-py) · [View on PyPI](https://pypi.org/project/docker-py/)