skillfed

types-docker

Typing stubs for docker

types-docker v7.2.0.20260813 1.3M downloads/30d#4,064 on PyPI37
Permissive license Apache-2.0 Active released

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-docker

uv

uv add types-docker

poetry

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 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

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

docker type stubsdocker typing annotationsmypy docker supportpyright docker typesdocker python type checking
type-stubsdocker

More Software Development packages