You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/superagent/client.py
+60-20
Original file line number
Diff line number
Diff line change
@@ -21,19 +21,32 @@ class Superagent:
21
21
"""
22
22
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions.
23
23
24
-
Parameters:
25
-
- base_url: typing.Optional[str]. The base url to use for requests from the client.
24
+
Parameters
25
+
----------
26
+
base_url : typing.Optional[str]
27
+
The base url to use for requests from the client.
26
28
27
-
- environment: SuperagentEnvironment. The environment to use for requests from the client. from .environment import SuperagentEnvironment
29
+
environment : SuperagentEnvironment
30
+
The environment to use for requests from the client. from .environment import SuperagentEnvironment
- timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds.
34
+
Defaults to SuperagentEnvironment.DEFAULT
34
35
35
-
- httpx_client: typing.Optional[httpx.Client]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
The timeout to be used, in seconds, for requests by default the timeout is 60 seconds, unless a custom httpx client is used, in which case a default is not set.
41
+
42
+
follow_redirects : typing.Optional[bool]
43
+
Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
44
+
45
+
httpx_client : typing.Optional[httpx.Client]
46
+
The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
Use this class to access the different functions within the SDK. You can instantiate any number of clients with different configuration that will propogate to these functions.
72
92
73
-
Parameters:
74
-
- base_url: typing.Optional[str]. The base url to use for requests from the client.
93
+
Parameters
94
+
----------
95
+
base_url : typing.Optional[str]
96
+
The base url to use for requests from the client.
97
+
98
+
environment : SuperagentEnvironment
99
+
The environment to use for requests from the client. from .environment import SuperagentEnvironment
100
+
101
+
102
+
103
+
Defaults to SuperagentEnvironment.DEFAULT
104
+
75
105
76
-
- environment: SuperagentEnvironment. The environment to use for requests from the client. from .environment import SuperagentEnvironment
The timeout to be used, in seconds, for requests by default the timeout is 60 seconds, unless a custom httpx client is used, in which case a default is not set.
Whether the default httpx client follows redirects or not, this is irrelevant if a custom httpx client is passed in.
81
113
82
-
- timeout: typing.Optional[float]. The timeout to be used, in seconds, for requests by default the timeout is 60 seconds.
114
+
httpx_client : typing.Optional[httpx.AsyncClient]
115
+
The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
83
116
84
-
- httpx_client: typing.Optional[httpx.AsyncClient]. The httpx client to use for making requests, a preconfigured client is used by default, however this is useful should you want to pass in any custom httpx configuration.
0 commit comments