Skip to content

Commit bf055a7

Browse files
committed
SDK regeneration
1 parent 73ac999 commit bf055a7

File tree

65 files changed

+1044
-331
lines changed

Some content is hidden

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

65 files changed

+1044
-331
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[![fern shield](https://img.shields.io/badge/%F0%9F%8C%BF-Built%20with%20Fern-brightgreen)](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FPipedreamHQ%2Fpipedream-sdk-python)
44
[![pypi](https://img.shields.io/pypi/v/pipedream)](https://pypi.python.org/pypi/pipedream)
55

6-
The Pipedream Python library provides convenient access to the Pipedream API from Python.
6+
The Pipedream Python library provides convenient access to the Pipedream APIs from Python.
77

88
## Installation
99

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

src/pipedream/actions/client.py

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from ..core.request_options import RequestOptions
88
from ..types.component import Component
99
from ..types.configure_prop_response import ConfigurePropResponse
10+
from ..types.configured_props import ConfiguredProps
1011
from ..types.reload_props_response import ReloadPropsResponse
1112
from ..types.run_action_opts_stash_id import RunActionOptsStashId
1213
from ..types.run_action_response import RunActionResponse
@@ -131,7 +132,7 @@ def configure_prop(
131132
external_user_id: str,
132133
prop_name: str,
133134
blocking: typing.Optional[bool] = OMIT,
134-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
135+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
135136
dynamic_props_id: typing.Optional[str] = OMIT,
136137
page: typing.Optional[float] = OMIT,
137138
prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
@@ -155,8 +156,7 @@ def configure_prop(
155156
blocking : typing.Optional[bool]
156157
Whether this operation should block until completion
157158
158-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
159-
The configured properties for the component
159+
configured_props : typing.Optional[ConfiguredProps]
160160
161161
dynamic_props_id : typing.Optional[str]
162162
The ID for dynamic props
@@ -214,7 +214,7 @@ def reload_props(
214214
id: str,
215215
external_user_id: str,
216216
blocking: typing.Optional[bool] = OMIT,
217-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
217+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
218218
dynamic_props_id: typing.Optional[str] = OMIT,
219219
request_options: typing.Optional[RequestOptions] = None,
220220
) -> ReloadPropsResponse:
@@ -232,8 +232,7 @@ def reload_props(
232232
blocking : typing.Optional[bool]
233233
Whether this operation should block until completion
234234
235-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
236-
The configured properties for the component
235+
configured_props : typing.Optional[ConfiguredProps]
237236
238237
dynamic_props_id : typing.Optional[str]
239238
The ID for dynamic props
@@ -276,7 +275,7 @@ def run(
276275
*,
277276
id: str,
278277
external_user_id: str,
279-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
278+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
280279
dynamic_props_id: typing.Optional[str] = OMIT,
281280
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
282281
request_options: typing.Optional[RequestOptions] = None,
@@ -292,8 +291,7 @@ def run(
292291
external_user_id : str
293292
The external user ID
294293
295-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
296-
The configured properties for the action
294+
configured_props : typing.Optional[ConfiguredProps]
297295
298296
dynamic_props_id : typing.Optional[str]
299297
The ID for dynamic props
@@ -468,7 +466,7 @@ async def configure_prop(
468466
external_user_id: str,
469467
prop_name: str,
470468
blocking: typing.Optional[bool] = OMIT,
471-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
469+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
472470
dynamic_props_id: typing.Optional[str] = OMIT,
473471
page: typing.Optional[float] = OMIT,
474472
prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
@@ -492,8 +490,7 @@ async def configure_prop(
492490
blocking : typing.Optional[bool]
493491
Whether this operation should block until completion
494492
495-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
496-
The configured properties for the component
493+
configured_props : typing.Optional[ConfiguredProps]
497494
498495
dynamic_props_id : typing.Optional[str]
499496
The ID for dynamic props
@@ -559,7 +556,7 @@ async def reload_props(
559556
id: str,
560557
external_user_id: str,
561558
blocking: typing.Optional[bool] = OMIT,
562-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
559+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
563560
dynamic_props_id: typing.Optional[str] = OMIT,
564561
request_options: typing.Optional[RequestOptions] = None,
565562
) -> ReloadPropsResponse:
@@ -577,8 +574,7 @@ async def reload_props(
577574
blocking : typing.Optional[bool]
578575
Whether this operation should block until completion
579576
580-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
581-
The configured properties for the component
577+
configured_props : typing.Optional[ConfiguredProps]
582578
583579
dynamic_props_id : typing.Optional[str]
584580
The ID for dynamic props
@@ -629,7 +625,7 @@ async def run(
629625
*,
630626
id: str,
631627
external_user_id: str,
632-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
628+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
633629
dynamic_props_id: typing.Optional[str] = OMIT,
634630
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
635631
request_options: typing.Optional[RequestOptions] = None,
@@ -645,8 +641,7 @@ async def run(
645641
external_user_id : str
646642
The external user ID
647643
648-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
649-
The configured properties for the action
644+
configured_props : typing.Optional[ConfiguredProps]
650645
651646
dynamic_props_id : typing.Optional[str]
652647
The ID for dynamic props

src/pipedream/actions/raw_client.py

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from ..core.serialization import convert_and_respect_annotation_metadata
1414
from ..types.component import Component
1515
from ..types.configure_prop_response import ConfigurePropResponse
16+
from ..types.configured_props import ConfiguredProps
1617
from ..types.get_component_response import GetComponentResponse
1718
from ..types.get_components_response import GetComponentsResponse
1819
from ..types.reload_props_response import ReloadPropsResponse
@@ -155,7 +156,7 @@ def configure_prop(
155156
external_user_id: str,
156157
prop_name: str,
157158
blocking: typing.Optional[bool] = OMIT,
158-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
159+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
159160
dynamic_props_id: typing.Optional[str] = OMIT,
160161
page: typing.Optional[float] = OMIT,
161162
prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
@@ -179,8 +180,7 @@ def configure_prop(
179180
blocking : typing.Optional[bool]
180181
Whether this operation should block until completion
181182
182-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
183-
The configured properties for the component
183+
configured_props : typing.Optional[ConfiguredProps]
184184
185185
dynamic_props_id : typing.Optional[str]
186186
The ID for dynamic props
@@ -210,7 +210,9 @@ def configure_prop(
210210
"external_user_id": external_user_id,
211211
"prop_name": prop_name,
212212
"blocking": blocking,
213-
"configured_props": configured_props,
213+
"configured_props": convert_and_respect_annotation_metadata(
214+
object_=configured_props, annotation=ConfiguredProps, direction="write"
215+
),
214216
"dynamic_props_id": dynamic_props_id,
215217
"page": page,
216218
"prev_context": prev_context,
@@ -243,7 +245,7 @@ def reload_props(
243245
id: str,
244246
external_user_id: str,
245247
blocking: typing.Optional[bool] = OMIT,
246-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
248+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
247249
dynamic_props_id: typing.Optional[str] = OMIT,
248250
request_options: typing.Optional[RequestOptions] = None,
249251
) -> HttpResponse[ReloadPropsResponse]:
@@ -261,8 +263,7 @@ def reload_props(
261263
blocking : typing.Optional[bool]
262264
Whether this operation should block until completion
263265
264-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
265-
The configured properties for the component
266+
configured_props : typing.Optional[ConfiguredProps]
266267
267268
dynamic_props_id : typing.Optional[str]
268269
The ID for dynamic props
@@ -282,7 +283,9 @@ def reload_props(
282283
"id": id,
283284
"external_user_id": external_user_id,
284285
"blocking": blocking,
285-
"configured_props": configured_props,
286+
"configured_props": convert_and_respect_annotation_metadata(
287+
object_=configured_props, annotation=ConfiguredProps, direction="write"
288+
),
286289
"dynamic_props_id": dynamic_props_id,
287290
},
288291
headers={
@@ -311,7 +314,7 @@ def run(
311314
*,
312315
id: str,
313316
external_user_id: str,
314-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
317+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
315318
dynamic_props_id: typing.Optional[str] = OMIT,
316319
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
317320
request_options: typing.Optional[RequestOptions] = None,
@@ -327,8 +330,7 @@ def run(
327330
external_user_id : str
328331
The external user ID
329332
330-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
331-
The configured properties for the action
333+
configured_props : typing.Optional[ConfiguredProps]
332334
333335
dynamic_props_id : typing.Optional[str]
334336
The ID for dynamic props
@@ -349,7 +351,9 @@ def run(
349351
json={
350352
"id": id,
351353
"external_user_id": external_user_id,
352-
"configured_props": configured_props,
354+
"configured_props": convert_and_respect_annotation_metadata(
355+
object_=configured_props, annotation=ConfiguredProps, direction="write"
356+
),
353357
"dynamic_props_id": dynamic_props_id,
354358
"stash_id": convert_and_respect_annotation_metadata(
355359
object_=stash_id, annotation=RunActionOptsStashId, direction="write"
@@ -512,7 +516,7 @@ async def configure_prop(
512516
external_user_id: str,
513517
prop_name: str,
514518
blocking: typing.Optional[bool] = OMIT,
515-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
519+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
516520
dynamic_props_id: typing.Optional[str] = OMIT,
517521
page: typing.Optional[float] = OMIT,
518522
prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
@@ -536,8 +540,7 @@ async def configure_prop(
536540
blocking : typing.Optional[bool]
537541
Whether this operation should block until completion
538542
539-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
540-
The configured properties for the component
543+
configured_props : typing.Optional[ConfiguredProps]
541544
542545
dynamic_props_id : typing.Optional[str]
543546
The ID for dynamic props
@@ -567,7 +570,9 @@ async def configure_prop(
567570
"external_user_id": external_user_id,
568571
"prop_name": prop_name,
569572
"blocking": blocking,
570-
"configured_props": configured_props,
573+
"configured_props": convert_and_respect_annotation_metadata(
574+
object_=configured_props, annotation=ConfiguredProps, direction="write"
575+
),
571576
"dynamic_props_id": dynamic_props_id,
572577
"page": page,
573578
"prev_context": prev_context,
@@ -600,7 +605,7 @@ async def reload_props(
600605
id: str,
601606
external_user_id: str,
602607
blocking: typing.Optional[bool] = OMIT,
603-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
608+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
604609
dynamic_props_id: typing.Optional[str] = OMIT,
605610
request_options: typing.Optional[RequestOptions] = None,
606611
) -> AsyncHttpResponse[ReloadPropsResponse]:
@@ -618,8 +623,7 @@ async def reload_props(
618623
blocking : typing.Optional[bool]
619624
Whether this operation should block until completion
620625
621-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
622-
The configured properties for the component
626+
configured_props : typing.Optional[ConfiguredProps]
623627
624628
dynamic_props_id : typing.Optional[str]
625629
The ID for dynamic props
@@ -639,7 +643,9 @@ async def reload_props(
639643
"id": id,
640644
"external_user_id": external_user_id,
641645
"blocking": blocking,
642-
"configured_props": configured_props,
646+
"configured_props": convert_and_respect_annotation_metadata(
647+
object_=configured_props, annotation=ConfiguredProps, direction="write"
648+
),
643649
"dynamic_props_id": dynamic_props_id,
644650
},
645651
headers={
@@ -668,7 +674,7 @@ async def run(
668674
*,
669675
id: str,
670676
external_user_id: str,
671-
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
677+
configured_props: typing.Optional[ConfiguredProps] = OMIT,
672678
dynamic_props_id: typing.Optional[str] = OMIT,
673679
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
674680
request_options: typing.Optional[RequestOptions] = None,
@@ -684,8 +690,7 @@ async def run(
684690
external_user_id : str
685691
The external user ID
686692
687-
configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
688-
The configured properties for the action
693+
configured_props : typing.Optional[ConfiguredProps]
689694
690695
dynamic_props_id : typing.Optional[str]
691696
The ID for dynamic props
@@ -706,7 +711,9 @@ async def run(
706711
json={
707712
"id": id,
708713
"external_user_id": external_user_id,
709-
"configured_props": configured_props,
714+
"configured_props": convert_and_respect_annotation_metadata(
715+
object_=configured_props, annotation=ConfiguredProps, direction="write"
716+
),
710717
"dynamic_props_id": dynamic_props_id,
711718
"stash_id": convert_and_respect_annotation_metadata(
712719
object_=stash_id, annotation=RunActionOptsStashId, direction="write"

src/pipedream/apps/__init__.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,31 @@
22

33
# isort: skip_file
44

5-
from .types import AppsListRequestSortDirection, AppsListRequestSortKey
5+
import typing
6+
from importlib import import_module
7+
8+
if typing.TYPE_CHECKING:
9+
from .types import AppsListRequestSortDirection, AppsListRequestSortKey
10+
_dynamic_imports: typing.Dict[str, str] = {"AppsListRequestSortDirection": ".types", "AppsListRequestSortKey": ".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+
result = getattr(module, attr_name)
20+
return result
21+
except ImportError as e:
22+
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
23+
except AttributeError as e:
24+
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e
25+
26+
27+
def __dir__():
28+
lazy_attrs = list(_dynamic_imports.keys())
29+
return sorted(lazy_attrs)
30+
631

732
__all__ = ["AppsListRequestSortDirection", "AppsListRequestSortKey"]

src/pipedream/apps/types/__init__.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,35 @@
22

33
# isort: skip_file
44

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

836
__all__ = ["AppsListRequestSortDirection", "AppsListRequestSortKey"]

0 commit comments

Comments
 (0)