3 {g @sdZddlZddlZddlZddlmZddZddZyeejejWn0e e fk rzej d j ejejeYnXdd l mZejd edd lmZmZmZmZdd lmZmZmZmZddlmZmZddlmZddlmZddlmZmZmZddl 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/m0Z0m1Z1m2Z2m3Z3m4Z4m5Z5m6Z6ddl7Z7ddl7m8Z8e7j9e:j;e8ejde4dddS)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('https://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. N)RequestsDependencyWarningcCs~|jd}t|dkr |jd|\}}}t|t|t|}}}|jddd\}}}t|t|t|}}}dS)N.0)splitlenappendint)Zurllib3_versionZchardet_versionmajorminorpatchr/usr/lib/python3.6/__init__.pycheck_compatibility1s    rc CsVyttt|jd}Wntk r,dSX|dddgkrRdj|}tj|tdS)Nrrrz4Old version of cryptography ({}) may cause slowdown.) listmapr r ValueErrorformatwarningswarnr)Zcryptography_versionZwarningrrr_check_cryptographyJs rz?urllib3 ({}) or chardet ({}) doesn't match a supported version!)DependencyWarningignore) __title____description____url__ __version__) __build__ __author____author_email__ __license__) __copyright____cake__)utils)packages)RequestResponsePreparedRequest)requestgetheadpostrputdeleteoptions)sessionSession)codes) RequestExceptionTimeout URLRequiredTooManyRedirects HTTPErrorConnectionErrorFileModeWarningConnectTimeout ReadTimeout) NullHandlerdefaultT)r )<__doc__Zurllib3Zchardetr exceptionsrrrrAssertionErrorrrrZurllib3.exceptionsr simplefilterrrrr r!r"r#r$r%r&r'Zmodelsr(r)r*Zapir+r,r-r.rr/r0r1Zsessionsr2r3Z status_codesr4r5r6r7r8r9r:r;r<r=Zloggingr>Z getLogger__name__Z addHandlerrrrr)s8        ( ,