11# This file was auto-generated by Fern from our API Definition.
22
3- import os
43import typing
54
65import httpx
98from .app_categories .client import AppCategoriesClient , AsyncAppCategoriesClient
109from .apps .client import AppsClient , AsyncAppsClient
1110from .components .client import AsyncComponentsClient , ComponentsClient
12- from .core .api_error import ApiError
1311from .core .client_wrapper import AsyncClientWrapper , SyncClientWrapper
1412from .core .oauth_token_provider import OAuthTokenProvider
1513from .deployed_triggers .client import AsyncDeployedTriggersClient , DeployedTriggersClient
@@ -42,8 +40,8 @@ class Client:
4240
4341 project_id : str
4442 x_pd_environment : typing.Optional[str]
45- client_id : typing.Optional[ str]
46- client_secret : typing.Optional[ str]
43+ client_id : str
44+ client_secret : str
4745 _token_getter_override : typing.Optional[typing.Callable[[], str]]
4846 timeout : typing.Optional[float]
4947 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 this default is not enforced.
@@ -73,8 +71,8 @@ def __init__(
7371 environment : PipedreamEnvironment = PipedreamEnvironment .PROD ,
7472 project_id : str ,
7573 x_pd_environment : typing .Optional [str ] = None ,
76- client_id : typing . Optional [ str ] = os . getenv ( "PIPEDREAM_CLIENT_ID" ) ,
77- client_secret : typing . Optional [ str ] = os . getenv ( "PIPEDREAM_CLIENT_SECRET" ) ,
74+ client_id : str ,
75+ client_secret : str ,
7876 _token_getter_override : typing .Optional [typing .Callable [[], str ]] = None ,
7977 timeout : typing .Optional [float ] = None ,
8078 follow_redirects : typing .Optional [bool ] = True ,
@@ -83,14 +81,6 @@ def __init__(
8381 _defaulted_timeout = (
8482 timeout if timeout is not None else 60 if httpx_client is None else httpx_client .timeout .read
8583 )
86- if client_id is None :
87- raise ApiError (
88- body = "The client must be instantiated be either passing in client_id or setting PIPEDREAM_CLIENT_ID"
89- )
90- if client_secret is None :
91- raise ApiError (
92- body = "The client must be instantiated be either passing in client_secret or setting PIPEDREAM_CLIENT_SECRET"
93- )
9484 oauth_token_provider = OAuthTokenProvider (
9585 client_id = client_id ,
9686 client_secret = client_secret ,
@@ -150,8 +140,8 @@ class AsyncClient:
150140
151141 project_id : str
152142 x_pd_environment : typing.Optional[str]
153- client_id : typing.Optional[ str]
154- client_secret : typing.Optional[ str]
143+ client_id : str
144+ client_secret : str
155145 _token_getter_override : typing.Optional[typing.Callable[[], str]]
156146 timeout : typing.Optional[float]
157147 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 this default is not enforced.
@@ -181,8 +171,8 @@ def __init__(
181171 environment : PipedreamEnvironment = PipedreamEnvironment .PROD ,
182172 project_id : str ,
183173 x_pd_environment : typing .Optional [str ] = None ,
184- client_id : typing . Optional [ str ] = os . getenv ( "PIPEDREAM_CLIENT_ID" ) ,
185- client_secret : typing . Optional [ str ] = os . getenv ( "PIPEDREAM_CLIENT_SECRET" ) ,
174+ client_id : str ,
175+ client_secret : str ,
186176 _token_getter_override : typing .Optional [typing .Callable [[], str ]] = None ,
187177 timeout : typing .Optional [float ] = None ,
188178 follow_redirects : typing .Optional [bool ] = True ,
@@ -191,14 +181,6 @@ def __init__(
191181 _defaulted_timeout = (
192182 timeout if timeout is not None else 60 if httpx_client is None else httpx_client .timeout .read
193183 )
194- if client_id is None :
195- raise ApiError (
196- body = "The client must be instantiated be either passing in client_id or setting PIPEDREAM_CLIENT_ID"
197- )
198- if client_secret is None :
199- raise ApiError (
200- body = "The client must be instantiated be either passing in client_secret or setting PIPEDREAM_CLIENT_SECRET"
201- )
202184 oauth_token_provider = OAuthTokenProvider (
203185 client_id = client_id ,
204186 client_secret = client_secret ,
0 commit comments