Events

class aiodocker.events.DockerEvents(docker)[source]
listen()[source]
async run(*, timeout: float | Sentinel | None = Sentinel.TOKEN, **params)[source]

Query the events endpoint of the Docker daemon.

Publish messages inside the asyncio queue.

Parameters:

timeout – The timeout for the events stream (infinite by default).

async stop()[source]
subscribe(*, create_task=True, **params)[source]

Subscribes to the Docker events channel. Use the keyword argument create_task=False to prevent automatically spawning the background tasks that listen to the events.

This function returns a ChannelSubscriber object.