Skip to content

Commit

Permalink
optional requests session with use_requests_session
Browse files Browse the repository at this point in the history
Signed-off-by: Praneeth Bedapudi <[email protected]>
  • Loading branch information
bedapudi6788 committed Nov 11, 2024
1 parent 347f6a2 commit 9507c28
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions clients/python/fdclient/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@


class FDClient:
def __init__(self, server_url, request_timeout, compression=True):
def __init__(self, server_url, request_timeout, compression=True, use_requests_session=False):
assert server_url.startswith("http://") or server_url.startswith(
"https://"
), "Server URL must start with http:// or https://"

self.server_url = server_url
self.local_storage = threading.local()
self.requests_session = requests.Session()
self.requests_session = requests.Session() if use_requests_session else requests
self.compression = compression if zstandard is not None else False
self.input_type = None
self._set_input_type()
Expand Down
2 changes: 1 addition & 1 deletion clients/python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
EMAIL = "[email protected]"
AUTHOR = "BEDAPUDI PRANEETH"
REQUIRES_PYTHON = ">=3.6.0"
VERSION = "3.1.0"
VERSION = "3.1.1"

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

0 comments on commit 9507c28

Please sign in to comment.