File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,12 @@ poetry add api-to-dataframe
5151# # Importing library
5252from api_to_dataframe import ClientBuilder, RetryStrategies
5353
54- # Create a client for the API without retry strategy
55- client = ClientBuilder(endpoint = " https://api.example.com" , retry_strategy = RetryStrategies.NoRetryStrategy )
54+ # Create a client for the API without retry strategy and default timeout (5 seconds)
55+ client = ClientBuilder(endpoint = " https://api.example.com" )
5656# or with LinearStrategy (In development, actually don't nothing)
5757client = ClientBuilder(endpoint = " https://api.example.com" , retry_strategy = RetryStrategies.LinearStrategy)
58+ # if you can define timeout, use: (default is 5 seconds)
59+ client = ClientBuilder(endpoint = " https://api.example.com" , retry_strategy = RetryStrategies.LinearStrategy, timeout = 10 )
5860
5961# Get data from the API
6062data = client.get_api_data()
You can’t perform that action at this time.
0 commit comments