Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support per-call timeouts in APIClient #3274

Open
kasium opened this issue Jul 9, 2024 · 1 comment
Open

Support per-call timeouts in APIClient #3274

kasium opened this issue Jul 9, 2024 · 1 comment

Comments

@kasium
Copy link

kasium commented Jul 9, 2024

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
Copy link
Author

kasium commented Jul 9, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant