"Requests"의 두 판 사이의 차이

(파이썬 requests 문서로 넘겨주기)
태그: 새 넘겨주기
(파이썬 requests에 대한 넘겨주기를 제거함)
태그: 넘겨주기 제거
 
1번째 줄: 1번째 줄:
#넘겨주기 [[파이썬 requests ]]
==개요==
;Python requests, Requests
;파이썬 리퀘스츠, 리퀘스트
* 파이썬 HTTP 라이브러리
* 슬로건: "HTTP for Humans"
* "간결한, 또 하나의 우아한 HTTP 라이브러리"
* 간단하고 편리하다.
* 주요기능: 헤더 정보, JSON 파싱, [[Basic Auth]]
 
[[파일:requests-sidebar.jpg|180px]]
 
==예제==
 
[[파일:Requests-google.png]]
 
<syntaxhighlight lang='python'>
import requests
r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
print( r.status_code ) # 200
print( r.headers['content-type'] ) # 'application/json; charset=utf8'
print( r.encoding ) # 'utf-8'
print( r.text ) # u'{"type":"User"...'
print( r.json() ) #{u'private_gists': 419, u'total_private_repos': 77, ...}
</syntaxhighlight>
 
==같이 보기==
* [[Python urllib]]
* [[PyPI 주요 모듈]]
* [[Beautiful Soup]]
* [[파이썬 urllib, urllib2, requests 모듈 차이점]]
 
==참고==
* http://docs.python-requests.org/
* https://requests.readthedocs.io/en/master/
* https://github.com/psf/requests
 
[[분류: Python requests]]
[[분류: Python 라이브러리]]
[[분류: HTTP]]

2021년 9월 18일 (토) 15:01 기준 최신판

1 개요[ | ]

Python requests, Requests
파이썬 리퀘스츠, 리퀘스트
  • 파이썬 HTTP 라이브러리
  • 슬로건: "HTTP for Humans"
  • "간결한, 또 하나의 우아한 HTTP 라이브러리"
  • 간단하고 편리하다.
  • 주요기능: 헤더 정보, JSON 파싱, Basic Auth

Requests-sidebar.jpg

2 예제[ | ]

Requests-google.png

import requests
r = requests.get('https://api.github.com/user', auth=('user', 'pass'))
print( r.status_code ) # 200
print( r.headers['content-type'] ) # 'application/json; charset=utf8'
print( r.encoding ) # 'utf-8'
print( r.text ) # u'{"type":"User"...'
print( r.json() ) #{u'private_gists': 419, u'total_private_repos': 77, ...}

3 같이 보기[ | ]

4 참고[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}