2222
2323
2424class GraphClientFactory (KiotaClientFactory ):
25- """Constructs httpx AsyncClient instances configured with either custom or default
26- pipeline of middleware.
27-
28- :func: Class constructor accepts a user provided session object and kwargs to configure the
29- request handling behaviour of the client
30- :keyword enum api_version: The Microsoft Graph API version to be used, for example
31- `APIVersion.v1` (default). This value is used in setting the base url for all requests for
32- that session.
33- :class:`~msgraphcore.enums.APIVersion` defines valid API versions.
34- :keyword enum cloud: a supported Microsoft Graph cloud endpoint.
35- Defaults to `NationalClouds.Global`
36- :class:`~msgraphcore.enums.NationalClouds` defines supported sovereign clouds.
37- :keyword tuple timeout: Default connection and read timeout values for all session requests.
38- Specify a tuple in the form of Tuple(connect_timeout, read_timeout) if you would like to set
39- the values separately. If you specify a single value for the timeout, the timeout value will
40- be applied to both the connect and the read timeouts.
41- :keyword obj session: A custom Session instance from the python requests library
25+ """Constructs httpx.AsyncClient instances configured with either custom or default
26+ pipeline of graph specific middleware.
4227 """
4328
4429 def __init__ (
@@ -48,8 +33,20 @@ def __init__(
4833 timeout : httpx .Timeout ,
4934 client : Optional [httpx .AsyncClient ],
5035 ):
51- """Class constructor that accepts a user provided session object and kwargs
52- to configure the request handling behaviour of the client"""
36+ """Class constructor accepts a user provided client object and kwargs to configure the
37+ request handling behaviour of the client
38+
39+ Args:
40+ api_version (APIVersion): The Microsoft Graph API version to be used, for example
41+ `APIVersion.v1` (default). This value is used in setting
42+ the base url for all requests for that session.
43+ base_url (NationalClouds): a supported Microsoft Graph cloud endpoint.
44+ timeout (httpx.Timeout):Default connection and read timeout values for all session
45+ requests.Specify a tuple in the form of httpx.Timeout(
46+ REQUEST_TIMEOUT, connect=CONNECTION_TIMEOUT),
47+ client (Optional[httpx.AsyncClient]): A custom AsynClient instance from the
48+ python httpx library
49+ """
5350 self .api_version = api_version
5451 self .base_url = base_url
5552 self .timeout = timeout
@@ -80,7 +77,8 @@ def create_with_custom_middleware(
8077 ) -> httpx .AsyncClient :
8178 """Applies a custom middleware chain to the HTTP Client
8279
83- :param list middleware: Custom middleware(HTTPAdapter) list that will be used to create
80+ Args:
81+ middleware(List[BaseMiddleware]): Custom middleware list that will be used to create
8482 a middleware pipeline. The middleware should be arranged in the order in which they will
8583 modify the request.
8684 """
0 commit comments