Skip to content
Open
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 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.6"
version = "1.0.7"
description = ""
readme = "README.md"
authors = []
Expand Down
31 changes: 18 additions & 13 deletions src/pipedream/actions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
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 @@ -132,7 +131,7 @@ def configure_prop(
external_user_id: str,
prop_name: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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 @@ -156,7 +155,8 @@ def configure_prop(
blocking : typing.Optional[bool]
Whether this operation should block until completion

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

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[ConfiguredProps] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = OMIT,
dynamic_props_id: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> ReloadPropsResponse:
Expand All @@ -232,7 +232,8 @@ def reload_props(
blocking : typing.Optional[bool]
Whether this operation should block until completion

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

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

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

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

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

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

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

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

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

dynamic_props_id : typing.Optional[str]
The ID for dynamic props
Expand Down
55 changes: 24 additions & 31 deletions src/pipedream/actions/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
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 @@ -156,7 +155,7 @@ def configure_prop(
external_user_id: str,
prop_name: str,
blocking: typing.Optional[bool] = OMIT,
configured_props: typing.Optional[ConfiguredProps] = OMIT,
configured_props: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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 @@ -180,7 +179,8 @@ def configure_prop(
blocking : typing.Optional[bool]
Whether this operation should block until completion

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

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

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

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

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

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

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

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

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

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

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

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

# isort: skip_file

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)

from .types import AppsListRequestSortDirection, AppsListRequestSortKey

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

# isort: skip_file

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)

from .apps_list_request_sort_direction import AppsListRequestSortDirection
from .apps_list_request_sort_key import AppsListRequestSortKey

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