Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F120708074
__init__.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Jul 6, 11:23
Size
1 KB
Mime Type
text/x-python
Expires
Tue, Jul 8, 11:23 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27192802
Attached To
R3852 EMS for Smart-Building
__init__.py
View Options
# -*- coding: utf-8 -*-
# __
# /__) _ _ _ _ _/ _
# / ( (- (/ (/ (- _) / _)
# /
"""
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 <http://python-requests.org>.
:copyright: (c) 2015 by Kenneth Reitz.
:license: Apache 2.0, see LICENSE for more details.
"""
__title__
=
'requests'
__version__
=
'2.8.1'
__build__
=
0x020801
__author__
=
'Kenneth Reitz'
__license__
=
'Apache 2.0'
__copyright__
=
'Copyright 2015 Kenneth Reitz'
# Attempt to enable urllib3's SNI support, if possible
try
:
from
.packages.urllib3.contrib
import
pyopenssl
pyopenssl
.
inject_into_urllib3
()
except
ImportError
:
pass
# Set default logging handler to avoid "No handler found" warnings.
import
logging
try
:
# Python 2.7+
from
logging
import
NullHandler
except
ImportError
:
class
NullHandler
(
logging
.
Handler
):
def
emit
(
self
,
record
):
pass
logging
.
getLogger
(
__name__
)
.
addHandler
(
NullHandler
())
Event Timeline
Log In to Comment