@@ -18,7 +18,9 @@ def create_client(sdk_key, data_governance=DataGovernance.Global):
1818
1919def create_client_with_auto_poll (sdk_key , poll_interval_seconds = 60 , max_init_wait_time_seconds = 5 ,
2020 on_configuration_changed_callback = None , config_cache_class = None ,
21- base_url = None , proxies = None , proxy_auth = None , data_governance = DataGovernance .Global ):
21+ base_url = None , proxies = None , proxy_auth = None , connect_timeout = 10 , read_timeout = 30 ,
22+ flag_overrides = None ,
23+ data_governance = DataGovernance .Global ):
2224 """
2325 Create an instance of ConfigCatClient and setup Auto Poll mode with custom options
2426
@@ -31,6 +33,10 @@ def create_client_with_auto_poll(sdk_key, poll_interval_seconds=60, max_init_wai
3133 :param base_url: You can set a base_url if you want to use a proxy server between your application and ConfigCat
3234 :param proxies: Proxy addresses. e.g. { 'https': 'your_proxy_ip:your_proxy_port' }
3335 :param proxy_auth: Proxy authentication. e.g. HTTPProxyAuth('username', 'password')
36+ :param connect_timeout: The number of seconds to wait for the server to make the initial connection
37+ (i.e. completing the TCP connection handshake). Default: 10 seconds.
38+ :param read_timeout: The number of seconds to wait for the server to respond before giving up. Default: 30 seconds.
39+ :param flag_overrides: An OverrideDataSource implementation used to override feature flags & settings.
3440 :param data_governance:
3541 Default: Global. Set this parameter to be in sync with the Data Governance preference on the Dashboard: \n
3642 https://app.configcat.com/organization/data-governance \n
@@ -46,13 +52,25 @@ def create_client_with_auto_poll(sdk_key, poll_interval_seconds=60, max_init_wai
4652 if max_init_wait_time_seconds < 0 :
4753 max_init_wait_time_seconds = 0
4854
49- return ConfigCatClient (sdk_key , poll_interval_seconds , max_init_wait_time_seconds ,
50- on_configuration_changed_callback , 0 , config_cache_class , base_url , proxies , proxy_auth ,
51- data_governance )
55+ return ConfigCatClient (sdk_key = sdk_key ,
56+ poll_interval_seconds = poll_interval_seconds ,
57+ max_init_wait_time_seconds = max_init_wait_time_seconds ,
58+ on_configuration_changed_callback = on_configuration_changed_callback ,
59+ cache_time_to_live_seconds = 0 ,
60+ config_cache_class = config_cache_class ,
61+ base_url = base_url ,
62+ proxies = proxies ,
63+ proxy_auth = proxy_auth ,
64+ connect_timeout = connect_timeout ,
65+ read_timeout = read_timeout ,
66+ flag_overrides = flag_overrides ,
67+ data_governance = data_governance )
5268
5369
5470def create_client_with_lazy_load (sdk_key , cache_time_to_live_seconds = 60 , config_cache_class = None ,
55- base_url = None , proxies = None , proxy_auth = None , data_governance = DataGovernance .Global ):
71+ base_url = None , proxies = None , proxy_auth = None , connect_timeout = 10 , read_timeout = 30 ,
72+ flag_overrides = None ,
73+ data_governance = DataGovernance .Global ):
5674 """
5775 Create an instance of ConfigCatClient and setup Lazy Load mode with custom options
5876
@@ -63,6 +81,10 @@ def create_client_with_lazy_load(sdk_key, cache_time_to_live_seconds=60, config_
6381 :param base_url: You can set a base_url if you want to use a proxy server between your application and ConfigCat
6482 :param proxies: Proxy addresses. e.g. { "https": "your_proxy_ip:your_proxy_port" }
6583 :param proxy_auth: Proxy authentication. e.g. HTTPProxyAuth('username', 'password')
84+ :param connect_timeout: The number of seconds to wait for the server to make the initial connection
85+ (i.e. completing the TCP connection handshake). Default: 10 seconds.
86+ :param read_timeout: The number of seconds to wait for the server to respond before giving up. Default: 30 seconds.
87+ :param flag_overrides: An OverrideDataSource implementation used to override feature flags & settings.
6688 :param data_governance:
6789 Default: Global. Set this parameter to be in sync with the Data Governance preference on the Dashboard: \n
6890 https://app.configcat.com/organization/data-governance \n
@@ -75,12 +97,25 @@ def create_client_with_lazy_load(sdk_key, cache_time_to_live_seconds=60, config_
7597 if cache_time_to_live_seconds < 1 :
7698 cache_time_to_live_seconds = 1
7799
78- return ConfigCatClient (sdk_key , 0 , 0 , None , cache_time_to_live_seconds , config_cache_class , base_url ,
79- proxies , proxy_auth , data_governance )
100+ return ConfigCatClient (sdk_key = sdk_key ,
101+ poll_interval_seconds = 0 ,
102+ max_init_wait_time_seconds = 0 ,
103+ on_configuration_changed_callback = None ,
104+ cache_time_to_live_seconds = cache_time_to_live_seconds ,
105+ config_cache_class = config_cache_class ,
106+ base_url = base_url ,
107+ proxies = proxies ,
108+ proxy_auth = proxy_auth ,
109+ connect_timeout = connect_timeout ,
110+ read_timeout = read_timeout ,
111+ flag_overrides = flag_overrides ,
112+ data_governance = data_governance )
80113
81114
82115def create_client_with_manual_poll (sdk_key , config_cache_class = None ,
83- base_url = None , proxies = None , proxy_auth = None , data_governance = DataGovernance .Global ):
116+ base_url = None , proxies = None , proxy_auth = None , connect_timeout = 10 , read_timeout = 30 ,
117+ flag_overrides = None ,
118+ data_governance = DataGovernance .Global ):
84119 """
85120 Create an instance of ConfigCatClient and setup Manual Poll mode with custom options
86121
@@ -90,6 +125,10 @@ def create_client_with_manual_poll(sdk_key, config_cache_class=None,
90125 :param base_url: You can set a base_url if you want to use a proxy server between your application and ConfigCat
91126 :param proxies: Proxy addresses. e.g. { "https": "your_proxy_ip:your_proxy_port" }
92127 :param proxy_auth: Proxy authentication. e.g. HTTPProxyAuth('username', 'password')
128+ :param connect_timeout: The number of seconds to wait for the server to make the initial connection
129+ (i.e. completing the TCP connection handshake). Default: 10 seconds.
130+ :param read_timeout: The number of seconds to wait for the server to respond before giving up. Default: 30 seconds.
131+ :param flag_overrides: An OverrideDataSource implementation used to override feature flags & settings.
93132 :param data_governance:
94133 Default: Global. Set this parameter to be in sync with the Data Governance preference on the Dashboard: \n
95134 https://app.configcat.com/organization/data-governance \n
@@ -99,4 +138,16 @@ def create_client_with_manual_poll(sdk_key, config_cache_class=None,
99138 if sdk_key is None :
100139 raise ConfigCatClientException ('SDK Key is required.' )
101140
102- return ConfigCatClient (sdk_key , 0 , 0 , None , 0 , config_cache_class , base_url , proxies , proxy_auth , data_governance )
141+ return ConfigCatClient (sdk_key = sdk_key ,
142+ poll_interval_seconds = 0 ,
143+ max_init_wait_time_seconds = 0 ,
144+ on_configuration_changed_callback = None ,
145+ cache_time_to_live_seconds = 0 ,
146+ config_cache_class = config_cache_class ,
147+ base_url = base_url ,
148+ proxies = proxies ,
149+ proxy_auth = proxy_auth ,
150+ connect_timeout = connect_timeout ,
151+ read_timeout = read_timeout ,
152+ flag_overrides = flag_overrides ,
153+ data_governance = data_governance )
0 commit comments