import cookielib
class Session(object):
+ """A Requests session."""
+
__attrs__ = ['headers', 'cookies', 'auth', 'timeout', 'proxies']
+
def __init__(self, **kwargs):
# Set up a CookieJar to be used by default
# Map and wrap requests.api methods
self._map_api_methods()
+
def __repr__(self):
return '<requests-client at 0x%x>' % (id(self))
+
def _map_api_methods(self):
"""Reads each available method from requests.api and decorates
them with a wrapper, which inserts any instance-local attributes