Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

requests

> 开发工具
Open source

A simple, yet elegant, HTTP library.

54.2K stars0 likes5 views
WebsiteGitHub

About

A simple, yet elegant, HTTP library.

Requests

Requests is a simple, yet elegant, HTTP library.

python
>>> import requests
>>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass'))
>>> r.status_code
200
>>> r.headers['content-type']
'application/json; charset=utf8'
>>> r.encoding
'utf-8'
>>> r.text
'{"authenticated": true, ...'
>>> r.json()
{'authenticated': True, ...}

Requests allows you to send HTTP/1.1 requests extremely easily. There’s no need to manually add query strings to your URLs, or to form-encode your PUT & POST data — but nowadays, just use the json method!

Requests is one of the most downloaded Python packages today, pulling in around 300M downloads / week — according to GitHub, Requests is currently depended upon by 4,000,000+ repositories.

Installing Requests and Supported Versions

Requests is available on PyPI:

bash
$ python -m pip install requests

Requests officially supports Python 3.10+.

Supported Features & Best–Practices

Requests is ready for the demands of building robust and reliable HTTP–speaking applications, for the needs of today.

  • Keep-Alive & Connection Pooling
  • International Domains and URLs
  • Sessions with Cookie Persistence
  • Browser-style TLS/SSL Verification
  • Basic & Digest Authentication
  • Familiar dict–like Cookies
  • Automatic Content Decompression and Decoding
  • Multi-part File Uploads
  • SOCKS Proxy Support
  • Connection Timeouts
  • Streaming Downloads
  • Automatic honoring of .netrc
  • Chunked HTTP Requests

Cloning the repository

When cloning the Requests repository, you may need to add the -c fetch.fsck.badTimezone=ignore flag to avoid an error about a bad commit timestamp (see this issue for more background):

bash
git clone -c fetch.fsck.badTimezone=ignore https://github.com/psf/requests.git

You can also apply this setting to your global Git config:

bash
git config --global fetch.fsck.badTimezone ignore

Issues· 241 open

View all issuesOpen on GitHub
  • #7629

    proxy_bypass_registry uses unanchored re.match (Windows proxy bypass)

    Updated Sep 27, 2026
  • #6238

    LookupDict does not implement full contract of the dict class

    Updated Sep 26, 2026
  • #7627

    Docstring examples in `from_key_val_list` show the pre-3.12 OrderedDict repr

    Updated Sep 26, 2026
  • #7630

    Incorrect type annotation for iter_lines

    Updated Sep 25, 2026
  • #7620

    PR 5410 got merged but is not in fact merged

    Updated Sep 17, 2026
  • #7547

    Documentation suggestion: Add troubleshooting guidance for common SSL verification errors

    Updated Sep 13, 2026
  • #7564

    raise FileNotFoundError for missing TLS material

    Updated Sep 13, 2026
  • #7610

    Drop the versionless `License ::` classifier now that `license` is a valid SPDX expression

    Updated Sep 6, 2026
  • #6008

    Unicode surrogates in POST data lead to exception

    Updated Sep 5, 2026
  • #5000

    `no_proxy` setting ignores the `proxies` dictionary

    Updated Sep 5, 2026

> Tags

Pythonclientcookiesforhumanshttp

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 29, 2026
Category开发工具
PricingOpen source

> Related tools

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具