Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![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)
[![pypi](https://img.shields.io/pypi/v/pipedream)](https://pypi.python.org/pypi/pipedream)

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

## Installation

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "pipedream"

[tool.poetry]
name = "pipedream"
version = "1.0.5"
version = "1.0.6"
description = ""
readme = "README.md"
authors = []
Expand Down
31 changes: 13 additions & 18 deletions src/pipedream/actions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from ..core.request_options import RequestOptions
from ..types.component import Component
from ..types.configure_prop_response import ConfigurePropResponse
from ..types.configured_props import ConfiguredProps
from ..types.reload_props_response import ReloadPropsResponse
from ..types.run_action_opts_stash_id import RunActionOptsStashId
from ..types.run_action_response import RunActionResponse
Expand Down Expand Up @@ -131,7 +132,7 @@ def configure_prop(
external_user_id: str,
prop_name: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
page: typing.Optional[float] = OMIT,
prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
Expand All @@ -155,8 +156,7 @@ def configure_prop(
blocking : typing.Optional[bool]
Whether this operation should block until completion

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the component
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down Expand Up @@ -214,7 +214,7 @@ def reload_props(
id: str,
external_user_id: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ReloadPropsResponse:
Expand All @@ -232,8 +232,7 @@ def reload_props(
blocking : typing.Optional[bool]
Whether this operation should block until completion

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the component
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down Expand Up @@ -276,7 +275,7 @@ def run(
*,
id: str,
external_user_id: str,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
Expand All @@ -292,8 +291,7 @@ def run(
external_user_id : str
The external user ID

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the action
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down Expand Up @@ -468,7 +466,7 @@ async def configure_prop(
external_user_id: str,
prop_name: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
page: typing.Optional[float] = OMIT,
prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
Expand All @@ -492,8 +490,7 @@ async def configure_prop(
blocking : typing.Optional[bool]
Whether this operation should block until completion

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the component
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down Expand Up @@ -559,7 +556,7 @@ async def reload_props(
id: str,
external_user_id: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ReloadPropsResponse:
Expand All @@ -577,8 +574,7 @@ async def reload_props(
blocking : typing.Optional[bool]
Whether this operation should block until completion

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the component
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down Expand Up @@ -629,7 +625,7 @@ async def run(
*,
id: str,
external_user_id: str,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
Expand All @@ -645,8 +641,7 @@ async def run(
external_user_id : str
The external user ID

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the action
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down
55 changes: 31 additions & 24 deletions src/pipedream/actions/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from ..core.serialization import convert_and_respect_annotation_metadata
from ..types.component import Component
from ..types.configure_prop_response import ConfigurePropResponse
from ..types.configured_props import ConfiguredProps
from ..types.get_component_response import GetComponentResponse
from ..types.get_components_response import GetComponentsResponse
from ..types.reload_props_response import ReloadPropsResponse
Expand Down Expand Up @@ -155,7 +156,7 @@ def configure_prop(
external_user_id: str,
prop_name: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
page: typing.Optional[float] = OMIT,
prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
Expand All @@ -179,8 +180,7 @@ def configure_prop(
blocking : typing.Optional[bool]
Whether this operation should block until completion

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the component
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down Expand Up @@ -210,7 +210,9 @@ def configure_prop(
"external_user_id": external_user_id,
"prop_name": prop_name,
"blocking": blocking,
"configured_props": configured_props,
"configured_props": convert_and_respect_annotation_metadata(
object_=configured_props, annotation=ConfiguredProps, direction="write"
),
"dynamic_props_id": dynamic_props_id,
"page": page,
"prev_context": prev_context,
Expand Down Expand Up @@ -243,7 +245,7 @@ def reload_props(
id: str,
external_user_id: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[ReloadPropsResponse]:
Expand All @@ -261,8 +263,7 @@ def reload_props(
blocking : typing.Optional[bool]
Whether this operation should block until completion

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the component
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand All @@ -282,7 +283,9 @@ def reload_props(
"id": id,
"external_user_id": external_user_id,
"blocking": blocking,
"configured_props": configured_props,
"configured_props": convert_and_respect_annotation_metadata(
object_=configured_props, annotation=ConfiguredProps, direction="write"
),
"dynamic_props_id": dynamic_props_id,
},
headers={
Expand Down Expand Up @@ -311,7 +314,7 @@ def run(
*,
id: str,
external_user_id: str,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
Expand All @@ -327,8 +330,7 @@ def run(
external_user_id : str
The external user ID

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the action
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand All @@ -349,7 +351,9 @@ def run(
json={
"id": id,
"external_user_id": external_user_id,
"configured_props": configured_props,
"configured_props": convert_and_respect_annotation_metadata(
object_=configured_props, annotation=ConfiguredProps, direction="write"
),
"dynamic_props_id": dynamic_props_id,
"stash_id": convert_and_respect_annotation_metadata(
object_=stash_id, annotation=RunActionOptsStashId, direction="write"
Expand Down Expand Up @@ -512,7 +516,7 @@ async def configure_prop(
external_user_id: str,
prop_name: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
page: typing.Optional[float] = OMIT,
prev_context: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
Expand All @@ -536,8 +540,7 @@ async def configure_prop(
blocking : typing.Optional[bool]
Whether this operation should block until completion

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the component
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down Expand Up @@ -567,7 +570,9 @@ async def configure_prop(
"external_user_id": external_user_id,
"prop_name": prop_name,
"blocking": blocking,
"configured_props": configured_props,
"configured_props": convert_and_respect_annotation_metadata(
object_=configured_props, annotation=ConfiguredProps, direction="write"
),
"dynamic_props_id": dynamic_props_id,
"page": page,
"prev_context": prev_context,
Expand Down Expand Up @@ -600,7 +605,7 @@ async def reload_props(
id: str,
external_user_id: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[ReloadPropsResponse]:
Expand All @@ -618,8 +623,7 @@ async def reload_props(
blocking : typing.Optional[bool]
Whether this operation should block until completion

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the component
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand All @@ -639,7 +643,9 @@ async def reload_props(
"id": id,
"external_user_id": external_user_id,
"blocking": blocking,
"configured_props": configured_props,
"configured_props": convert_and_respect_annotation_metadata(
object_=configured_props, annotation=ConfiguredProps, direction="write"
),
"dynamic_props_id": dynamic_props_id,
},
headers={
Expand Down Expand Up @@ -668,7 +674,7 @@ async def run(
*,
id: str,
external_user_id: str,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
stash_id: typing.Optional[RunActionOptsStashId] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
Expand All @@ -684,8 +690,7 @@ async def run(
external_user_id : str
The external user ID

configured_props : typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]
The configured properties for the action
configured_props : typing.Optional[ConfiguredProps]

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand All @@ -706,7 +711,9 @@ async def run(
json={
"id": id,
"external_user_id": external_user_id,
"configured_props": configured_props,
"configured_props": convert_and_respect_annotation_metadata(
object_=configured_props, annotation=ConfiguredProps, direction="write"
),
"dynamic_props_id": dynamic_props_id,
"stash_id": convert_and_respect_annotation_metadata(
object_=stash_id, annotation=RunActionOptsStashId, direction="write"
Expand Down
27 changes: 26 additions & 1 deletion src/pipedream/apps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

# isort: skip_file

from .types import AppsListRequestSortDirection, AppsListRequestSortKey
import typing
from importlib import import_module

if typing.TYPE_CHECKING:
from .types import AppsListRequestSortDirection, AppsListRequestSortKey
_dynamic_imports: typing.Dict[str, str] = {"AppsListRequestSortDirection": ".types", "AppsListRequestSortKey": ".types"}


def __getattr__(attr_name: str) -> typing.Any:
module_name = _dynamic_imports.get(attr_name)
if module_name is None:
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
try:
module = import_module(module_name, __package__)
result = getattr(module, attr_name)
return result
except ImportError as e:
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
except AttributeError as e:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)


__all__ = ["AppsListRequestSortDirection", "AppsListRequestSortKey"]
32 changes: 30 additions & 2 deletions src/pipedream/apps/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,35 @@

# isort: skip_file

from .apps_list_request_sort_direction import AppsListRequestSortDirection
from .apps_list_request_sort_key import AppsListRequestSortKey
import typing
from importlib import import_module

if typing.TYPE_CHECKING:
from .apps_list_request_sort_direction import AppsListRequestSortDirection
from .apps_list_request_sort_key import AppsListRequestSortKey
_dynamic_imports: typing.Dict[str, str] = {
"AppsListRequestSortDirection": ".apps_list_request_sort_direction",
"AppsListRequestSortKey": ".apps_list_request_sort_key",
}


def __getattr__(attr_name: str) -> typing.Any:
module_name = _dynamic_imports.get(attr_name)
if module_name is None:
raise AttributeError(f"No {attr_name} found in _dynamic_imports for module name -> {__name__}")
try:
module = import_module(module_name, __package__)
result = getattr(module, attr_name)
return result
except ImportError as e:
raise ImportError(f"Failed to import {attr_name} from {module_name}: {e}") from e
except AttributeError as e:
raise AttributeError(f"Failed to get {attr_name} from {module_name}: {e}") from e


def __dir__():
lazy_attrs = list(_dynamic_imports.keys())
return sorted(lazy_attrs)


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