--- id: types-docker version: "7.2.0.20260813" license: Apache-2.0 license_treatment: permissive maintenance: active --- # types-docker — Typing stubs for docker License: permissive · Maintenance: active · Downloads: 1.3M/mo ## What it is and what it does types-docker is a type stub package that provides static type annotations for the docker Python client library. It allows type checkers like mypy, pyright, and others to understand and validate code that imports and uses the docker package, catching type errors before runtime. The package is maintained as part of typeshed, the central repository for Python type stubs. It targets docker version 7.2.* and has been tested with multiple type checkers (mypy 2.3.0, pyright 1.1.411, and others). Installation is straightforward with minimal dependencies, and it requires Python 3.10 or later. Use it for: - Enable type checking in a project that uses the docker client library with mypy or pyright - Catch type errors in docker API calls during development rather than at runtime - Improve IDE autocomplete and inline documentation for docker package methods and classes - Validate docker container and image management code in CI/CD pipelines ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type hints for the docker package, enabling static type checkers like mypy and pyright to validate code that uses the Docker Python client. Yes, if you use the docker package and want static type checking. Install it alongside docker to enable type checkers to validate your code. No downside if you're already using a type checker—it's a stub-only package with low friction and permissive licensing. ## Install pip install types-docker uv add types-docker poetry add types-docker ## Installing types-docker Before you install: Low install friction with only two runtime dependencies (types-requests and urllib3). Actively maintained as part of typeshed; released 2026-08-13 with recent commit activity. License in practice: Apache-2.0 permissive license allows use in most projects without restriction. Quickstart: pip install types-docker # In your code, mypy/pyright will now type-check docker imports: import docker client = docker.from_env() Requires Python 3.10 or later. Verify before relying: - Whether this stub version remains accurate as docker package evolves beyond 7.2.* - Coverage completeness for all docker API surface areas used in practice ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.3M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags docker type stubs, docker typing annotations, mypy docker support, pyright docker types, docker python type checking, type-stubs, docker [View on SkillFed](https://skillfed.io/packages/types-docker) · [View on PyPI](https://pypi.org/project/types-docker/)