skillfed

aiodocker

A simple Docker HTTP API wrapper written with asyncio and aiohttp.

aiodocker v0.27.0 1.4M downloads/30d#3,887 on PyPI
Permissive license Apache 2.0 Active released

What it is and what it does

aiodocker is an asyncio-native wrapper around the Docker HTTP API, built on aiohttp. It lets you write non-blocking Python code to create, start, stop, and inspect containers and images, manage networks and volumes, and stream logs—all without blocking the event loop. The package exposes Docker's REST endpoints through a Pythonic async interface, so you can integrate Docker operations into concurrent applications like web servers, task queues, or orchestration tools.

The library is lightweight (a single wheel with one dependency) and actively maintained. It supports Python 3.10 through 3.13 and is permissively licensed under Apache 2.0. Use it when you need to automate Docker from async Python code—for example, spinning up test containers in a CI pipeline, managing microservices in a cloud application, or building deployment tooling that doesn't block other concurrent work.

Use it for:

  • Spin up and tear down Docker containers in async test fixtures or CI/CD pipelines.
  • Build async orchestration or deployment tools that manage multiple containers concurrently.
  • Stream container logs and monitor resource usage from an async web service or dashboard.
  • Automate Docker image builds and pushes as part of a larger async workflow.
  • Integrate Docker operations into async task queues or background job systems.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides async/await bindings for the Docker HTTP API, letting you manage containers, images, and other Docker resources from Python asyncio code.

Yes. Low install friction, active maintenance, permissive license, no known vulnerabilities, and a clear use case for anyone building async Python applications that need to control Docker. The single dependency (aiohttp) is itself widely used and stable. Install if you're writing asyncio code and need Docker automation.

Install

aiodocker on PyPI

pip

pip install aiodocker

uv

uv add aiodocker

poetry

poetry add aiodocker

Installing aiodocker

Before you install

Low friction: pure Python wheel with a single runtime dependency (aiohttp). Actively maintained as of 79 days ago, supports current Python versions (3.10–3.13).

License in practice

Apache 2.0 permissive license; you can use this in commercial and proprietary projects with minimal restrictions.

Quickstart

pip install aiodocker

import asyncio
import aiodocker

async def main():
    docker = aiodocker.Docker()
    images = await docker.images.list()
    print(images)
    await docker.close()

asyncio.run(main())

Requires Python 3.10 or later and a running Docker daemon accessible via the Docker socket or HTTP endpoint.

Verify before relying

  • Whether the package works with Docker Desktop, Docker Engine, or both.
  • Support for Docker API authentication methods beyond default socket/env configuration.
  • Performance characteristics when managing large numbers of containers or images.

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.10.0)
Install friction low — pure-Python wheel
Runtime dependencies 1 — aiohttp
Maintenance actively maintained — 79 days since the last release
First released
Downloads 1,448,642/month — #3,887 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aiodocker-0.27.0-py3-none-any.whl

Programming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

async docker clientasyncio docker apidocker container management asyncaiohttp docker wrapperasync docker operationsdocker http api asyncio
async-iodocker-automationcontainer-management

More Distributed Computing packages