Skip to content

Commit e9b6e54

Browse files
committed
Add method to retrieve the client's access token
1 parent 0330025 commit e9b6e54

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "pipedream"
33

44
[tool.poetry]
55
name = "pipedream"
6-
version = "1.0.0"
6+
version = "1.0.1"
77
description = ""
88
readme = "README.md"
99
authors = []

src/pipedream/core/client_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ def __init__(
2727

2828
def get_headers(self) -> typing.Dict[str, str]:
2929
headers: typing.Dict[str, str] = {
30-
"User-Agent": "pipedream/1.0.0",
30+
"User-Agent": "pipedream/1.0.1",
3131
"X-Fern-Language": "Python",
3232
"X-Fern-SDK-Name": "pipedream",
33-
"X-Fern-SDK-Version": "1.0.0",
33+
"X-Fern-SDK-Version": "1.0.1",
3434
**(self.get_custom_headers() or {}),
3535
}
3636
if self._project_environment is not None:

src/pipedream/pipedream.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ def __init__(
4949
workflow_domain=workflow_domain,
5050
)
5151

52+
@property
53+
def raw_access_token(self) -> Optional[str]:
54+
"""
55+
Returns an access token that can be used to authenticate API requests
56+
"""
57+
return self._client_wrapper._get_token()
58+
5259

5360
class AsyncPipedream(AsyncClient):
5461

@@ -87,6 +94,13 @@ def __init__(
8794
workflow_domain=workflow_domain,
8895
)
8996

97+
@property
98+
def raw_access_token(self) -> Optional[str]:
99+
"""
100+
Returns an access token that can be used to authenticate API requests
101+
"""
102+
return self._client_wrapper._get_token()
103+
90104

91105
def _get_base_url(environment: PipedreamEnvironment) -> str:
92106
"""

0 commit comments

Comments
 (0)