9
9
from .types .project_environment import ProjectEnvironment
10
10
11
11
12
- class OAuthCredentials :
13
-
14
- def __init__ (
15
- self ,
16
- client_id : Optional [str ] = None ,
17
- client_secret : Optional [str ] = None ,
18
- ):
19
- self .client_id = client_id or os .getenv ("PIPEDREAM_CLIENT_ID" )
20
- self .client_secret = client_secret or os .getenv (
21
- "PIPEDREAM_CLIENT_SECRET" )
22
-
23
-
24
12
class Pipedream (Client ):
25
13
26
14
def __init__ (
27
15
self ,
28
16
* ,
29
- credentials : OAuthCredentials = OAuthCredentials (),
17
+ client_id : Optional [str ] = None ,
18
+ client_secret : Optional [str ] = None ,
30
19
project_id : Optional [str ] = None ,
31
20
project_environment : ProjectEnvironment = "production" ,
32
21
environment : PipedreamEnvironment = PipedreamEnvironment .PROD ,
33
- ** kwargs ,
34
22
):
35
23
project_id = project_id or os .getenv ("PIPEDREAM_PROJECT_ID" )
36
24
if not project_id :
37
25
raise ValueError ("Project ID is required" )
38
26
39
27
super ().__init__ (
40
28
base_url = _get_base_url (environment ),
41
- client_id = credentials . client_id ,
42
- client_secret = credentials . client_secret ,
29
+ client_id = client_id ,
30
+ client_secret = client_secret ,
43
31
project_id = project_id ,
44
32
project_environment = project_environment ,
45
- ** kwargs ,
46
33
)
47
34
48
35
@@ -51,7 +38,8 @@ class AsyncPipedream(AsyncClient):
51
38
def __init__ (
52
39
self ,
53
40
* ,
54
- credentials : OAuthCredentials = OAuthCredentials (),
41
+ client_id : Optional [str ] = None ,
42
+ client_secret : Optional [str ] = None ,
55
43
project_id : Optional [str ] = None ,
56
44
project_environment : ProjectEnvironment = "production" ,
57
45
environment : PipedreamEnvironment = PipedreamEnvironment .PROD ,
@@ -63,8 +51,8 @@ def __init__(
63
51
64
52
super ().__init__ (
65
53
base_url = _get_base_url (environment ),
66
- client_id = credentials . client_id ,
67
- client_secret = credentials . client_secret ,
54
+ client_id = client_id ,
55
+ client_secret = client_secret ,
68
56
project_id = project_id ,
69
57
project_environment = project_environment ,
70
58
** kwargs ,
0 commit comments