3 gY @sdZddlZddlZddlZddlmZddZyeejejWn0ee fk rrej dj ejejeYnXyddl m Z e jWnek rYnXdd lmZejd edd lmZmZmZmZdd lmZmZmZmZdd lmZmZddlmZddlmZddlm Z m!Z!m"Z"ddl#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+ddl,m-Z-m.Z.ddl/m0Z0ddlm1Z1m2Z2m3Z3m4Z4m5Z5m6Z6m7Z7m8Z8m9Z9ddl:Z:yddl:m;Z;Wn(ek rGddde:j<Z;YnXe:j=e>j?e;ejde7dddS)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. N)RequestsDependencyWarningcCs|jd}|dgkstt|dkr.|jd|\}}}t|t|t|}}}|dks`t|dkslt|dksxt|jddd\}}}t|t|t|}}}|dkst|dkst|dkstdS) N.Zdev0r)splitAssertionErrorlenappendint)Zurllib3_versionZchardet_versionmajorminorpatchrB/Users/olari/OneDrive/sandbox/awsBlog2/lambda/requests/__init__.pycheck_compatibility1s         rzAurllib3 ({0}) or chardet ({1}) doesn't match a supported version!) pyopenssl)DependencyWarningignore) __title____description____url__ __version__) __build__ __author____author_email__ __license__) __copyright____cake__)utils)packages)RequestResponsePreparedRequest)requestgetheadpostrputdeleteoptions)sessionSession)codes) RequestExceptionTimeout URLRequiredTooManyRedirects HTTPErrorConnectionErrorFileModeWarningConnectTimeout ReadTimeout) NullHandlerc@seZdZddZdS)r:cCsdS)Nr)selfrecordrrremitsszNullHandler.emitN)__name__ __module__ __qualname__r=rrrrr:rsr:defaultT)r )@__doc__urllib3chardetwarnings exceptionsrrrr ValueErrorwarnformatZurllib3.contribrZinject_into_urllib3 ImportErrorZurllib3.exceptionsr simplefilterrrrrrrrr r!r"r#modelsr$r%r&apir'r(r)r*rr+r,r-sessionsr.r/ status_codesr0r1r2r3r4r5r6r7r8r9loggingr:Handler getLoggerr> addHandlerrrrr)sF         ( ,