[Docs] Clarify behavior of timeout parameter in requests.get

Open Beginner friendly
#7,350 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Locate the documentation entry for requests.get() and its timeout parameter. Clarify that a single float applies to both connection and read timeouts, and that a tuple specifies them separately, using the issue's example. Done when the rendered documentation communicates this distinction without implying a total request timeout.

Written by the indexing model from the issue text.

Description

Description

The current documentation for the timeout parameter in requests.get() does not clearly explain that it applies to both connection and read timeouts unless specified otherwise.

This can be confusing for users who expect it to behave as a total request timeout.

Suggested Improvement

Add clarification in the docs that:

  • A single float applies to both connect and read timeouts
  • A tuple can be used to specify them separately

Example:

requests.get(url, timeout=(connect_timeout, read_timeout))
Dominant language
Python
Stars
54.3k
Forks
10.5k
Avg merge
16h 43m
Merged PRs (30d)
3

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.

More from psf/requests

All issues in psf/requests

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.