docker-py

A Python library for the Docker Engine API

https://github.com/docker/docker-py

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    9 of 450 committers (2.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.6%) to scientific vocabulary

Keywords

docker docker-engine-api docker-swarm python python-library

Keywords from Contributors

templates apps views closember distribution orchestration unit-testing docker-compose fuzzing pallets
Last synced: 6 months ago · JSON representation

Repository

A Python library for the Docker Engine API

Basic Info
Statistics
  • Stars: 7,050
  • Watchers: 193
  • Forks: 1,692
  • Open Issues: 523
  • Releases: 89
Topics
docker docker-engine-api docker-swarm python python-library
Created over 12 years ago · Last pushed 8 months ago
Metadata Files
Readme Contributing License

README.md

Docker SDK for Python

Build Status

A Python library for the Docker Engine API. It lets you do anything the docker command does, but from within Python apps – run containers, manage containers, manage Swarms, etc.

Installation

The latest stable version is available on PyPI. Install with pip:

pip install docker

Older versions (< 6.0) required installing docker[tls] for SSL/TLS support. This is no longer necessary and is a no-op, but is supported for backwards compatibility.

Usage

Connect to Docker using the default socket or the configuration in your environment:

python import docker client = docker.from_env()

You can run containers:

```python

client.containers.run("ubuntu:latest", "echo hello world") 'hello world\n' ```

You can run containers in the background:

```python

client.containers.run("bfirsh/reticulate-splines", detach=True) ```

You can manage containers:

```python

client.containers.list() [, , ...]

container = client.containers.get('45e6d2de7c54')

container.attrs['Config']['Image'] "bfirsh/reticulate-splines"

container.logs() "Reticulating spline 1...\n"

container.stop() ```

You can stream logs:

```python

for line in container.logs(stream=True): ... print(line.strip()) Reticulating spline 2... Reticulating spline 3... ... ```

You can manage images:

```python

client.images.pull('nginx')

client.images.list() [, , ...] ```

Read the full documentation to see everything you can do.

Owner

  • Name: Docker
  • Login: docker
  • Kind: organization
  • Email: info@docker.com
  • Location: San Francisco, CA

Docker helps developers bring their ideas to life by conquering the complexity of app development.

GitHub Events

Total
  • Issues event: 32
  • Watch event: 268
  • Issue comment event: 96
  • Push event: 7
  • Pull request review event: 26
  • Pull request review comment event: 16
  • Pull request event: 37
  • Fork event: 50
Last Year
  • Issues event: 32
  • Watch event: 268
  • Issue comment event: 96
  • Push event: 7
  • Pull request review event: 26
  • Pull request review comment event: 16
  • Pull request event: 37
  • Fork event: 50

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 2,330
  • Total Committers: 450
  • Avg Commits per committer: 5.178
  • Development Distribution Score (DDS): 0.613
Past Year
  • Commits: 12
  • Committers: 4
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.333
Top Committers
Name Email Commits
Joffrey F j****y@d****m 901
shin- j****y@d****m 112
Aanand Prasad a****d@g****m 86
Ben Firshman b****n@f****k 68
Sebastiaan van Stijn g****b@g****l 59
Ulysses Souza u****a@d****m 44
aiordache a****e@d****m 41
Milas Bowman m****n@d****m 39
Maxime Petazzoni m****x@s****m 30
Aarni Koskela a****x@i****i 22
Corentin Henry c****y@g****m 20
Hannes Ljungberg h****s@5****e 19
Felipe Ruhland f****d@g****m 15
Tomas Tomecek t****k@r****m 14
Deni Bertovic d****i@k****g 13
Viktor Adam r****6@g****m 12
nir0s n****g@g****m 10
Frank Sachsenheim f****e@r****t 10
Enrico r****l@g****m 10
Nicolas Delaby n****y@e****m 10
Mariano Scazzariello m****o@g****m 9
Darren Shepherd d****d@g****m 9
micahhausler m****r@a****m 8
Matthieu Nottale m****e@d****m 8
Tom Arnfeld t****d@m****m 8
Till Riedel r****l@t****u 8
Patrick Hensley s****y@i****m 8
Peter Yu y****7@g****m 8
Erik Johnson p****e@g****m 8
dependabot[bot] 4****] 7
and 420 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 234
  • Total pull requests: 227
  • Average time to close issues: 4 months
  • Average time to close pull requests: 6 months
  • Total issue authors: 222
  • Total pull request authors: 118
  • Average comments per issue: 3.25
  • Average comments per pull request: 1.48
  • Merged pull requests: 81
  • Bot issues: 0
  • Bot pull requests: 4
Past Year
  • Issues: 37
  • Pull requests: 43
  • Average time to close issues: 19 days
  • Average time to close pull requests: 20 days
  • Issue authors: 36
  • Pull request authors: 19
  • Average comments per issue: 0.78
  • Average comments per pull request: 0.37
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • Pymann (4)
  • James-Ilosta (3)
  • AstraLuma (2)
  • Khushiyant (2)
  • valentinedwv (2)
  • kasium (2)
  • akhildevelops (2)
  • nicolargo (2)
  • rrauenza (2)
  • arsolics (1)
  • moti-malka (1)
  • Bawen34 (1)
  • emendir (1)
  • unreal79 (1)
  • DMTarmey (1)
Pull Request Authors
  • Khushiyant (21)
  • thaJeztah (19)
  • milas (12)
  • akx (11)
  • krissetto (10)
  • adamtheturtle (7)
  • vvoland (5)
  • BillyGLW (5)
  • dependabot[bot] (3)
  • owenwu811 (3)
  • felixfontein (3)
  • peteristhegreat (2)
  • bauen1 (2)
  • gringolito (2)
  • sigma67 (2)
Top Labels
Issue Labels
kind/question (23) kind/feature-request (11) kind/bug (9) kind/enhancement (4) group/documentation (3) level/apiclient (3) group/api-upgrade (3) group/windows (2) level/docker-engine (2) level/dockerclient (2) dependencies (1) status/need-info (1) status/0-triage (1) needs-buildkit (1)
Pull Request Labels
dco/no (16) kind/chore (9) kind/bug (8) kind/enhancement (7) group/documentation (7) dependencies (6) group/api-upgrade (4) level/apiclient (4) level/dockerclient (3) breaking-change (3) group/windows (2) status/need-info (2) release-management (2) status/0-triage (1)

Packages

  • Total packages: 24
  • Total downloads:
    • pypi 82,132,234 last-month
  • Total docker downloads: 3,120,685,021
  • Total dependent packages: 1,221
    (may contain duplicates)
  • Total dependent repositories: 24,113
    (may contain duplicates)
  • Total versions: 213
  • Total maintainers: 15
pypi.org: docker

A Python library for the Docker Engine API.

  • Versions: 65
  • Dependent Packages: 1,134
  • Dependent Repositories: 19,587
  • Downloads: 81,706,552 Last month
  • Docker Downloads: 2,677,013,325
Rankings
Docker downloads count: 0.0%
Dependent packages count: 0.0%
Downloads: 0.0%
Dependent repos count: 0.1%
Average: 0.4%
Stargazers count: 0.7%
Forks count: 1.3%
Last synced: 6 months ago
pypi.org: docker-py

Python client for Docker.

  • Versions: 60
  • Dependent Packages: 29
  • Dependent Repositories: 4,459
  • Downloads: 425,584 Last month
  • Docker Downloads: 443,671,696
Rankings
Dependent repos count: 0.1%
Docker downloads count: 0.3%
Stargazers count: 0.3%
Average: 0.5%
Dependent packages count: 0.6%
Downloads: 0.8%
Forks count: 1.0%
Maintainers (2)
Last synced: 6 months ago
alpine-v3.18: py3-docker-py-pyc

Precompiled Python bytecode for py3-docker-py

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 0.9%
Forks count: 1.2%
Stargazers count: 2.5%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.18: py3-docker-py

Python library for the Docker Engine API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 0.9%
Forks count: 1.3%
Stargazers count: 2.5%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: py3-docker-py

Python library for the Docker Engine API

  • Versions: 8
  • Dependent Packages: 2
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.1%
Average: 1.7%
Stargazers count: 2.4%
Dependent packages count: 3.4%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.16: docker-py

Python library for the Docker Engine API

  • Versions: 1
  • Dependent Packages: 4
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.0%
Stargazers count: 2.0%
Average: 2.6%
Dependent packages count: 7.3%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.17: docker-py

Python library for the Docker Engine API

  • Versions: 1
  • Dependent Packages: 4
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.2%
Stargazers count: 2.3%
Average: 2.8%
Dependent packages count: 7.9%
Maintainers (1)
Last synced: 6 months ago
conda-forge.org: docker-py
  • Versions: 37
  • Dependent Packages: 38
  • Dependent Repositories: 32
Rankings
Dependent packages count: 1.8%
Forks count: 3.2%
Average: 4.0%
Stargazers count: 4.4%
Dependent repos count: 6.4%
Last synced: 6 months ago
spack.io: py-docker

A Python library for the Docker Engine API.

  • Versions: 3
  • Dependent Packages: 4
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Stargazers count: 1.7%
Forks count: 2.1%
Average: 4.5%
Dependent packages count: 14.2%
Maintainers (1)
Last synced: about 1 year ago
alpine-edge: py3-docker-py-pyc

Precompiled Python bytecode for py3-docker-py

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.2%
Stargazers count: 2.5%
Average: 4.5%
Dependent packages count: 14.3%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.15: docker-py

Python library for the Docker Engine API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 1.1%
Stargazers count: 2.0%
Average: 7.2%
Dependent packages count: 25.6%
Maintainers (1)
Last synced: 6 months ago
pypi.org: pyansys-docker

A Python library for the Docker Engine API.

  • Versions: 1
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 66 Last month
Rankings
Stargazers count: 0.3%
Forks count: 1.0%
Downloads: 6.9%
Dependent packages count: 7.4%
Average: 7.6%
Dependent repos count: 22.2%
Maintainers (1)
Last synced: 6 months ago
pypi.org: gc-docker-py

Python client for Docker.

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 2
  • Downloads: 14 Last month
Rankings
Stargazers count: 0.3%
Forks count: 1.0%
Dependent packages count: 7.4%
Average: 11.5%
Dependent repos count: 11.9%
Downloads: 36.8%
Maintainers (2)
Last synced: 6 months ago
pypi.org: docker-with-criu

A Python library for the Docker Engine API.

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 18 Last month
Rankings
Stargazers count: 0.3%
Forks count: 1.0%
Dependent packages count: 7.3%
Average: 12.4%
Dependent repos count: 40.8%
Maintainers (1)
Last synced: 6 months ago
anaconda.org: docker-py

A Python library for the Docker Engine API. It lets you do anything the docker command does, but from within Python apps - run containers, manage containers, manage Swarms, etc.

  • Versions: 11
  • Dependent Packages: 5
  • Dependent Repositories: 32
Rankings
Dependent packages count: 7.0%
Forks count: 8.5%
Stargazers count: 10.5%
Average: 13.6%
Dependent repos count: 28.2%
Last synced: 6 months ago
pypi.org: docker-custom-unofficial

A Python library for the Docker Engine API. (with a modification to make ssh work again... as no clear configuration path for SSH was added for the new 'security' patches)

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 29.7%
Dependent repos count: 50.5%
Maintainers (1)
Last synced: 8 months ago
alpine-v3.22: py3-docker-py

Python library for the Docker Engine API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-docker-py

Python library for the Docker Engine API

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-docker-py

Python library for the Docker Engine API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.21: py3-docker-py-pyc

Precompiled Python bytecode for py3-docker-py

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.22: py3-docker-py-pyc

Precompiled Python bytecode for py3-docker-py

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.20: py3-docker-py-pyc

Precompiled Python bytecode for py3-docker-py

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-docker-py

Python library for the Docker Engine API

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago
alpine-v3.19: py3-docker-py-pyc

Precompiled Python bytecode for py3-docker-py

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 0.0%
Average: 100%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/release.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • ncipollo/release-action v1 composite
  • pypa/gh-action-pypi-publish release/v1 composite
Dockerfile docker
  • python ${PYTHON_VERSION} build
tests/Dockerfile docker
  • python ${PYTHON_VERSION} build
docs-requirements.txt pypi
  • Sphinx ==5.1.1
  • myst-parser ==0.18.0
requirements.txt pypi
  • packaging ==21.3
  • paramiko ==2.11.0
  • pywin32 ==304
  • requests ==2.28.1
  • urllib3 ==1.26.11
  • websocket-client ==1.3.3
test-requirements.txt pypi
  • coverage ==6.4.2 test
  • flake8 ==4.0.1 test
  • pytest ==7.1.2 test
  • pytest-cov ==3.0.0 test
  • pytest-timeout ==2.1.0 test
  • setuptools ==65.5.1 test