B E`- @sdZddlZddlZddlZddlmZddZddZyeejejWn0e e fk rze d ejejeYnXy^y ddl Z Wnek rdZ YnXee d d sdd lmZedd lmZeeWnek rYnXddlmZededdlmZmZmZmZddlmZmZmZmZddlmZm Z ddl!m"Z"ddl!m#Z#ddl$m%Z%m&Z&m'Z'ddl(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0ddl1m2Z2m3Z3ddl4m5Z5ddlm6Z6m7Z7m8Z8m9Z9m:Z:m;Z;mZ>ddl?Z?ddl?m@Z@e?AeBCe@ejde>> import requests >>> r = requests.get('https://www.python.org') >>> r.status_code 200 >>> b'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": { "key1": "value1", "key2": "value2" }, ... } 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|d}|dgkstt|dkr.|d|\}}}t|t|t|}}}|dks`t|dkslt|dksxt|ddd\}}}t|t|t|}}}d |||fkrd ksntdS) N.dev0r)r rr)rr)splitAssertionErrorlenappendint)urllib3_versionchardet_versionmajorminorpatchrl/private/var/folders/7j/8686xlfs15q3tgljmghtvg0r0000gn/T/pip-target-9vv6f6fu/lib/python/requests/__init__.pycheck_compatibility1s       rcCsVyttt|d}Wntk r,dSX|dddgkrRd|}t|tdS)Nrrr z4Old version of cryptography ({}) may cause slowdown.) listmaprr ValueErrorformatwarningswarnr)cryptography_versionwarningrrr_check_cryptographyHs r"z?urllib3 ({}) or chardet ({}) doesn't match a supported version!HAS_SNIF) pyopenssl) __version__)DependencyWarningignore) __title____description____url__r%) __build__ __author____author_email__ __license__) __copyright____cake__)utils)packages)RequestResponsePreparedRequest)requestgetheadpostrputdeleteoptions)sessionSession)codes) RequestExceptionTimeout URLRequiredTooManyRedirects HTTPErrorConnectionErrorFileModeWarningConnectTimeout ReadTimeout) NullHandlerdefaultT)r)D__doc__urllib3chardetr exceptionsrrr"r%r rrrssl ImportErrorgetattrZurllib3.contribr$inject_into_urllib3Z cryptographyr Zurllib3.exceptionsr& simplefilterr(r)r*r+r,r-r.r/r0r1r2modelsr3r4r5apir6r7r8r9rr:r;r<sessionsr=r> status_codesr?r@rArBrCrDrErFrGrHloggingrI getLogger__name__ addHandlerrrrr)sP              ( ,