docker-py
docker-py copied to clipboard
Support per-call timeouts in APIClient
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)
Of course it's not as easy as it sounds, since the timeout is also given to requests, urllib3 and custom HTTP adapters