•  


GitHub - kennethreitz/requests: A simple, yet elegant HTTP library.
Skip to content

kennethreitz/requests

 
 

Requests

Requests is a simple, yet elegant, HTTP library.

>>
>
 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 30M downloads / week ? according to GitHub, Requests is currently depended upon by 1,000,000+ repositories. You may certainly put your trust in this code.

Downloads Supported Versions Contributors

Installing Requests and Supported Versions

Requests is available on PyPI:

$ 
python -m pip install requests

Requests officially supports Python 3.8+.

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

API Reference and User Guide available on Read the Docs

Read the Docs

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 (see this issue for more background):

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

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

git config --global fetch.fsck.badTimezone ignore

Kenneth Reitz Python Software Foundation

About

A simple, yet elegant HTTP library.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.3%
  • Makefile 0.7%
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본