3
Pf
@ s d Z ddlmZ ddlmZ ddlZddlmZ dd Zyeejej W n0 e e
fk
rz ejd jejeje Y nX dd
l
mZ ejde ddlmZmZmZmZ dd
lmZmZmZmZ ddlmZmZ ddlmZ ddlmZ ddlmZmZmZ ddl m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z( ddl)m*Z*m+Z+ ddl,m-Z- ddlm.Z.m/Z/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6 ddl7Z7yddl7m8Z8 W n( e9k
r G dd de7j:Z8Y nX e7j;e<j=e8 ejde4dd dS )a
Requests HTTP Library
~~~~~~~~~~~~~~~~~~~~~
Requests is an HTTP library, written in Python, for human beings. Basic GET
usage:
>>> import requests
>>> r = requests.get('https://www.python.org')
>>> r.status_code
200
>>> 'Python is a programming language' in r.content
True
... or POST:
>>> payload = dict(key1='value1', key2='value2')
>>> r = requests.post('http://httpbin.org/post', data=payload)
>>> print(r.text)
{
...
"form": {
"key2": "value2",
"key1": "value1"
},
...
}
The other HTTP methods are supported - see `requests.api`. Full documentation
is at .
:copyright: (c) 2017 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.
)urllib3)chardetN )RequestsDependencyWarningc C s | j d} | dgkstt| dkr.| jd | \}}}t|t|t| }}}|dks`t|dkslt|dksxt|j dd d \}}}t|t|t| }}}|dkst|dk st|dkstd S ) N.Zdev 0r )splitAssertionErrorlenappendint)Zurllib3_versionZchardet_versionmajorminorpatch r /usr/lib/python3.6/__init__.pycheck_compatibility1 s
r zAurllib3 ({0}) or chardet ({1}) doesn't match a supported version!)DependencyWarningignore) __title____description____url____version__) __build__
__author____author_email____license__)
__copyright____cake__)utils)packages)RequestResponsePreparedRequest)requestgetheadpostr putdeleteoptions)sessionSession)codes) RequestExceptionTimeoutURLRequiredTooManyRedirects HTTPErrorConnectionErrorFileModeWarningConnectTimeoutReadTimeout)NullHandlerc @ s e Zd Zdd ZdS )r; c C s d S )Nr )selfrecordr r r emits s zNullHandler.emitN)__name__
__module____qualname__r> r r r r r; r s r; defaultT)r )>__doc__Zpip._vendorr r warnings
exceptionsr r r r
ValueErrorwarnformatZpip._vendor.urllib3.exceptionsr simplefilterr r r r r r r r! r" r# r$ Zmodelsr% r&