Skip to content

Commit 9507c28

Browse files
committed
optional requests session with use_requests_session
Signed-off-by: Praneeth Bedapudi <[email protected]>
1 parent 347f6a2 commit 9507c28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

clients/python/fdclient/client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@
1717

1818

1919
class FDClient:
20-
def __init__(self, server_url, request_timeout, compression=True):
20+
def __init__(self, server_url, request_timeout, compression=True, use_requests_session=False):
2121
assert server_url.startswith("http://") or server_url.startswith(
2222
"https://"
2323
), "Server URL must start with http:// or https://"
2424

2525
self.server_url = server_url
2626
self.local_storage = threading.local()
27-
self.requests_session = requests.Session()
27+
self.requests_session = requests.Session() if use_requests_session else requests
2828
self.compression = compression if zstandard is not None else False
2929
self.input_type = None
3030
self._set_input_type()

clients/python/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
1919
AUTHOR = "BEDAPUDI PRANEETH"
2020
REQUIRES_PYTHON = ">=3.6.0"
21-
VERSION = "3.1.0"
21+
VERSION = "3.1.1"
2222

2323
# What packages are required for this module to be executed?
2424
REQUIRED = ["zstandard", "requests", "msgpack"]

0 commit comments

Comments
 (0)