docker / docker/docker-py

Support per-call timeouts in APIClient

Open
#3,274 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
7.2k
Forks
1.7k
Avg merge
13d 8h
Merged PRs (30d)
2

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the APIClient timeout handling and the inspect_container entry point shown in the example. Determine how a per-call timeout could coexist with the construction-time default, then verify that inspect_container can use a one-off timeout without changing the client's default behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.