Skip to content

Commit d30d6b2

Browse files
SDK regeneration
1 parent 777b0c2 commit d30d6b2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+728
-767
lines changed

.fern/metadata.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"cliVersion": "1.0.4",
3+
"generatorName": "fernapi/fern-python-sdk",
4+
"generatorVersion": "4.36.2",
5+
"generatorConfig": {
6+
"client": {
7+
"class_name": "Client",
8+
"filename": "client.py",
9+
"exported_class_name": "Pipedream",
10+
"exported_filename": "pipedream.py"
11+
}
12+
}
13+
}

README.md

Lines changed: 27 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@
55

66
The Pipedream Python library provides convenient access to the Pipedream APIs from Python.
77

8+
## Table of Contents
9+
10+
- [Installation](#installation)
11+
- [Reference](#reference)
12+
- [Usage](#usage)
13+
- [Async Client](#async-client)
14+
- [Exception Handling](#exception-handling)
15+
- [Pagination](#pagination)
16+
- [Advanced](#advanced)
17+
- [Access Raw Response Data](#access-raw-response-data)
18+
- [Retries](#retries)
19+
- [Timeouts](#timeouts)
20+
- [Custom Client](#custom-client)
21+
- [Contributing](#contributing)
22+
823
## Installation
924

1025
```sh
@@ -89,21 +104,23 @@ client = Pipedream(
89104
client_id="YOUR_CLIENT_ID",
90105
client_secret="YOUR_CLIENT_SECRET",
91106
)
92-
response = client.apps.list(
93-
after="after",
94-
before="before",
95-
limit=1,
96-
q="q",
97-
sort_key="name",
98-
sort_direction="asc",
99-
)
107+
response = client.apps.list()
100108
for item in response:
101109
yield item
102110
# alternatively, you can paginate page-by-page
103111
for page in response.iter_pages():
104112
yield page
105113
```
106114

115+
```python
116+
# You can also iterate through pages and access the typed response per page
117+
pager = client.apps.list(...)
118+
for page in pager.iter_pages():
119+
print(page.response) # access the typed response for each page
120+
for item in page:
121+
print(item)
122+
```
123+
107124
## Advanced
108125

109126
### Access Raw Response Data
@@ -121,11 +138,11 @@ response = client.actions.with_raw_response.run(...)
121138
print(response.headers) # access the response headers
122139
print(response.data) # access the underlying object
123140
pager = client.apps.list(...)
124-
print(pager.response.headers) # access the response headers for the first page
141+
print(pager.response) # access the typed response for the first page
125142
for item in pager:
126143
print(item) # access the underlying object(s)
127144
for page in pager.iter_pages():
128-
print(page.response.headers) # access the response headers for each page
145+
print(page.response) # access the typed response for each page
129146
for item in page:
130147
print(item) # access the underlying object(s)
131148
```

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
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.11"
6+
version = "1.0.12"
77
description = ""
88
readme = "README.md"
99
authors = []
@@ -30,7 +30,7 @@ packages = [
3030
{ include = "pipedream", from = "src"}
3131
]
3232

33-
[project.urls]
33+
[tool.poetry.urls]
3434
Repository = 'https://github.com/PipedreamHQ/pipedream-sdk-python'
3535

3636
[tool.poetry.dependencies]

src/pipedream/accounts/client.py

Lines changed: 7 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from ..core.pagination import AsyncPager, SyncPager
77
from ..core.request_options import RequestOptions
88
from ..types.account import Account
9+
from ..types.list_accounts_response import ListAccountsResponse
910
from .raw_client import AsyncRawAccountsClient, RawAccountsClient
1011

1112
# this is used as the default value for optional parameters
@@ -38,7 +39,7 @@ def list(
3839
app: typing.Optional[str] = None,
3940
include_credentials: typing.Optional[bool] = None,
4041
request_options: typing.Optional[RequestOptions] = None,
41-
) -> SyncPager[Account]:
42+
) -> SyncPager[Account, ListAccountsResponse]:
4243
"""
4344
Retrieve all connected accounts for the project with optional filtering
4445
@@ -69,7 +70,7 @@ def list(
6970
7071
Returns
7172
-------
72-
SyncPager[Account]
73+
SyncPager[Account, ListAccountsResponse]
7374
accounts listed
7475
7576
Examples
@@ -82,15 +83,7 @@ def list(
8283
client_id="YOUR_CLIENT_ID",
8384
client_secret="YOUR_CLIENT_SECRET",
8485
)
85-
response = client.accounts.list(
86-
external_user_id="external_user_id",
87-
oauth_app_id="oauth_app_id",
88-
after="after",
89-
before="before",
90-
limit=1,
91-
app="app",
92-
include_credentials=True,
93-
)
86+
response = client.accounts.list()
9487
for item in response:
9588
yield item
9689
# alternatively, you can paginate page-by-page
@@ -160,8 +153,6 @@ def create(
160153
client_secret="YOUR_CLIENT_SECRET",
161154
)
162155
client.accounts.create(
163-
external_user_id="external_user_id",
164-
oauth_app_id="oauth_app_id",
165156
app_slug="app_slug",
166157
cfmap_json="cfmap_json",
167158
connect_token="connect_token",
@@ -215,7 +206,6 @@ def retrieve(
215206
)
216207
client.accounts.retrieve(
217208
account_id="account_id",
218-
include_credentials=True,
219209
)
220210
"""
221211
_response = self._raw_client.retrieve(
@@ -314,7 +304,7 @@ async def list(
314304
app: typing.Optional[str] = None,
315305
include_credentials: typing.Optional[bool] = None,
316306
request_options: typing.Optional[RequestOptions] = None,
317-
) -> AsyncPager[Account]:
307+
) -> AsyncPager[Account, ListAccountsResponse]:
318308
"""
319309
Retrieve all connected accounts for the project with optional filtering
320310
@@ -345,7 +335,7 @@ async def list(
345335
346336
Returns
347337
-------
348-
AsyncPager[Account]
338+
AsyncPager[Account, ListAccountsResponse]
349339
accounts listed
350340
351341
Examples
@@ -363,15 +353,7 @@ async def list(
363353
364354
365355
async def main() -> None:
366-
response = await client.accounts.list(
367-
external_user_id="external_user_id",
368-
oauth_app_id="oauth_app_id",
369-
after="after",
370-
before="before",
371-
limit=1,
372-
app="app",
373-
include_credentials=True,
374-
)
356+
response = await client.accounts.list()
375357
async for item in response:
376358
yield item
377359
@@ -450,8 +432,6 @@ async def create(
450432
451433
async def main() -> None:
452434
await client.accounts.create(
453-
external_user_id="external_user_id",
454-
oauth_app_id="oauth_app_id",
455435
app_slug="app_slug",
456436
cfmap_json="cfmap_json",
457437
connect_token="connect_token",
@@ -513,7 +493,6 @@ async def retrieve(
513493
async def main() -> None:
514494
await client.accounts.retrieve(
515495
account_id="account_id",
516-
include_credentials=True,
517496
)
518497
519498

0 commit comments

Comments
 (0)