types-docker
Typing stubs for docker
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 on this page — 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
types-docker on PyPI
pip
pip install types-dockeruv
uv add types-dockerpoetry
poetry add types-dockerInstalling 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 the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — types-requests, urllib3 |
| Maintenance | actively maintained — 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,319,556/month — #4,064 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_docker-7.2.0.20260813-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
optypeoptype provides single-method protocols and…
permissive · top 5,000 on PyPI
types-dateparserProvides type stubs for the dateparser package,…
permissive · top 5,000 on PyPI
types-django-filterProvides type hints for django-filter, enabling…
permissive · top 15,000 on PyPI
types-hvacProvides type hints for the hvac package,…
permissive · top 15,000 on PyPI
types-braintreeProvides type hints for the braintree payment…
permissive · top 15,000 on PyPI
types-pyinstallerProvides type stubs for pyinstaller, enabling…
permissive · top 15,000 on PyPI
types-tensorflowProvides type hints for TensorFlow 2.18.0,…
permissive · top 15,000 on PyPI
types-grpcioProvides type stubs for the grpcio package,…
permissive · top 5,000 on PyPI
types-PyMySQLProvides type stubs for PyMySQL to enable…
permissive · top 5,000 on PyPI
types-paramikoProvides type hints for paramiko, enabling…
permissive · top 1,000 on PyPI