docker-py icon indicating copy to clipboard operation
docker-py copied to clipboard

Support per-call timeouts in APIClient

Open kasium opened this issue 1 year ago • 1 comments

As for now, I can only set the timeout in the client during construction. However, if a certain call needs another timeout, it's not possible to change it:

from docker import APIClient

client = APIClient(timeout=10)
client.inspect_container("container_id")
# wish: client.inspect_container("container_id", timeout=60)

kasium avatar Jul 09 '24 09:07 kasium

Of course it's not as easy as it sounds, since the timeout is also given to requests, urllib3 and custom HTTP adapters

kasium avatar Jul 09 '24 09:07 kasium