File tree Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Expand file tree Collapse file tree 3 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,11 @@ Changelog
3
3
4
4
Here you find a full list of changes.
5
5
6
+ Version 2.0.1
7
+ -------------
8
+
9
+ - Reuse HTTP connections between requests
10
+
6
11
Version 2.0.0
7
12
-------------
8
13
Original file line number Diff line number Diff line change 3
3
except ImportError :
4
4
from distutils .core import setup
5
5
6
- VERSION = '2.0.0 '
6
+ VERSION = '2.0.1 '
7
7
8
8
setup (
9
9
name = 'usabilla-api' ,
Original file line number Diff line number Diff line change @@ -127,6 +127,8 @@ class APIClient(object):
127
127
host = 'data.usabilla.com'
128
128
host_protocol = 'https://'
129
129
130
+ session = requests .Session ()
131
+
130
132
def __init__ (self , client_key , secret_key ):
131
133
"""Initialize an APIClient object."""
132
134
self .query_parameters = ''
@@ -237,7 +239,7 @@ def send_signed_request(self, scope):
237
239
238
240
# Send the request.
239
241
request_url = self .host + scope + '?' + canonical_querystring
240
- r = requests .get (self .host_protocol + request_url , headers = headers )
242
+ r = self . session .get (self .host_protocol + request_url , headers = headers )
241
243
r .raise_for_status ()
242
244
243
245
return r .json ()
You can’t perform that action at this time.
0 commit comments