Skip to content

Commit c3d356a

Browse files
SDK regeneration
1 parent 1325d86 commit c3d356a

38 files changed

+1030
-828
lines changed

README.md

Lines changed: 16 additions & 8 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,14 +104,7 @@ 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

poetry.lock

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

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.11"
6+
version = "1.0.12"
77
description = ""
88
readme = "README.md"
99
authors = []

src/pipedream/accounts/client.py

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,7 @@ def list(
8282
client_id="YOUR_CLIENT_ID",
8383
client_secret="YOUR_CLIENT_SECRET",
8484
)
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-
)
85+
response = client.accounts.list()
9486
for item in response:
9587
yield item
9688
# alternatively, you can paginate page-by-page
@@ -160,8 +152,6 @@ def create(
160152
client_secret="YOUR_CLIENT_SECRET",
161153
)
162154
client.accounts.create(
163-
external_user_id="external_user_id",
164-
oauth_app_id="oauth_app_id",
165155
app_slug="app_slug",
166156
cfmap_json="cfmap_json",
167157
connect_token="connect_token",
@@ -215,7 +205,6 @@ def retrieve(
215205
)
216206
client.accounts.retrieve(
217207
account_id="account_id",
218-
include_credentials=True,
219208
)
220209
"""
221210
_response = self._raw_client.retrieve(
@@ -363,15 +352,7 @@ async def list(
363352
364353
365354
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-
)
355+
response = await client.accounts.list()
375356
async for item in response:
376357
yield item
377358
@@ -450,8 +431,6 @@ async def create(
450431
451432
async def main() -> None:
452433
await client.accounts.create(
453-
external_user_id="external_user_id",
454-
oauth_app_id="oauth_app_id",
455434
app_slug="app_slug",
456435
cfmap_json="cfmap_json",
457436
connect_token="connect_token",
@@ -513,7 +492,6 @@ async def retrieve(
513492
async def main() -> None:
514493
await client.accounts.retrieve(
515494
account_id="account_id",
516-
include_credentials=True,
517495
)
518496
519497

src/pipedream/actions/__init__.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,33 @@
22

33
# isort: skip_file
44

5+
import typing
6+
from importlib import import_module
7+
8+
if typing.TYPE_CHECKING:
9+
from .types import ListActionsRequestRegistry
10+
_dynamic_imports: typing.Dict[str, str] = {"ListActionsRequestRegistry": ".types"}
11+
12+
13+
def __getattr__(attr_name: str) -> typing.Any:
14+
module_name = _dynamic_imports.get(attr_name)
15+
if module_name is None:
16+
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
17+
try:
18+
module = import_module(module_name, __package__)
19+
if module_name == f".{attr_name}":
20+
return module
21+
else:
22+
return getattr(module, attr_name)
23+
except ImportError as e:
24+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
25+
except AttributeError as e:
26+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
27+
28+
29+
def __dir__():
30+
lazy_attrs = list(_dynamic_imports.keys())
31+
return sorted(lazy_attrs)
32+
33+
34+
__all__ = ["ListActionsRequestRegistry"]

src/pipedream/actions/client.py

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from ..types.run_action_opts_stash_id import RunActionOptsStashId
1313
from ..types.run_action_response import RunActionResponse
1414
from .raw_client import AsyncRawActionsClient, RawActionsClient
15+
from .types.list_actions_request_registry import ListActionsRequestRegistry
1516

1617
# this is used as the default value for optional parameters
1718
OMIT = typing.cast(typing.Any, ...)
@@ -40,6 +41,7 @@ def list(
4041
limit: typing.Optional[int] = None,
4142
q: typing.Optional[str] = None,
4243
app: typing.Optional[str] = None,
44+
registry: typing.Optional[ListActionsRequestRegistry] = None,
4345
request_options: typing.Optional[RequestOptions] = None,
4446
) -> SyncPager[Component]:
4547
"""
@@ -62,13 +64,16 @@ def list(
6264
app : typing.Optional[str]
6365
The ID or name slug of the app to filter the actions
6466
67+
registry : typing.Optional[ListActionsRequestRegistry]
68+
The registry to retrieve actions from. Defaults to 'all' ('public', 'private', or 'all')
69+
6570
request_options : typing.Optional[RequestOptions]
6671
Request-specific configuration.
6772
6873
Returns
6974
-------
7075
SyncPager[Component]
71-
actions listed
76+
behaves like registry=all
7277
7378
Examples
7479
--------
@@ -80,21 +85,15 @@ def list(
8085
client_id="YOUR_CLIENT_ID",
8186
client_secret="YOUR_CLIENT_SECRET",
8287
)
83-
response = client.actions.list(
84-
after="after",
85-
before="before",
86-
limit=1,
87-
q="q",
88-
app="app",
89-
)
88+
response = client.actions.list()
9089
for item in response:
9190
yield item
9291
# alternatively, you can paginate page-by-page
9392
for page in response.iter_pages():
9493
yield page
9594
"""
9695
return self._raw_client.list(
97-
after=after, before=before, limit=limit, q=q, app=app, request_options=request_options
96+
after=after, before=before, limit=limit, q=q, app=app, registry=registry, request_options=request_options
9897
)
9998

10099
def retrieve(
@@ -386,6 +385,7 @@ async def list(
386385
limit: typing.Optional[int] = None,
387386
q: typing.Optional[str] = None,
388387
app: typing.Optional[str] = None,
388+
registry: typing.Optional[ListActionsRequestRegistry] = None,
389389
request_options: typing.Optional[RequestOptions] = None,
390390
) -> AsyncPager[Component]:
391391
"""
@@ -408,13 +408,16 @@ async def list(
408408
app : typing.Optional[str]
409409
The ID or name slug of the app to filter the actions
410410
411+
registry : typing.Optional[ListActionsRequestRegistry]
412+
The registry to retrieve actions from. Defaults to 'all' ('public', 'private', or 'all')
413+
411414
request_options : typing.Optional[RequestOptions]
412415
Request-specific configuration.
413416
414417
Returns
415418
-------
416419
AsyncPager[Component]
417-
actions listed
420+
behaves like registry=all
418421
419422
Examples
420423
--------
@@ -431,13 +434,7 @@ async def list(
431434
432435
433436
async def main() -> None:
434-
response = await client.actions.list(
435-
after="after",
436-
before="before",
437-
limit=1,
438-
q="q",
439-
app="app",
440-
)
437+
response = await client.actions.list()
441438
async for item in response:
442439
yield item
443440
@@ -449,7 +446,7 @@ async def main() -> None:
449446
asyncio.run(main())
450447
"""
451448
return await self._raw_client.list(
452-
after=after, before=before, limit=limit, q=q, app=app, request_options=request_options
449+
after=after, before=before, limit=limit, q=q, app=app, registry=registry, request_options=request_options
453450
)
454451

455452
async def retrieve(

0 commit comments

Comments
 (0)