Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
1 change: 1 addition & 0 deletions .fernignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ src/pipedream/pipedream.py

# Custom Proxy files
src/pipedream/proxy/client.py
src/pipedream/proxy/raw_client.py

# Custom Workflow files
src/pipedream/workflows/__init__.py
Expand Down
24 changes: 16 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@

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

## Table of Contents

- [Installation](#installation)
- [Reference](#reference)
- [Usage](#usage)
- [Async Client](#async-client)
- [Exception Handling](#exception-handling)
- [Pagination](#pagination)
- [Advanced](#advanced)
- [Access Raw Response Data](#access-raw-response-data)
- [Retries](#retries)
- [Timeouts](#timeouts)
- [Custom Client](#custom-client)
- [Contributing](#contributing)

## Installation

```sh
Expand Down Expand Up @@ -89,14 +104,7 @@ client = Pipedream(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
response = client.apps.list(
after="after",
before="before",
limit=1,
q="q",
sort_key="name",
sort_direction="asc",
)
response = client.apps.list()
for item in response:
yield item
# alternatively, you can paginate page-by-page
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.11"
version = "1.0.12"
description = ""
readme = "README.md"
authors = []
Expand Down
26 changes: 2 additions & 24 deletions src/pipedream/accounts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,7 @@ def list(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
response = client.accounts.list(
external_user_id="external_user_id",
oauth_app_id="oauth_app_id",
after="after",
before="before",
limit=1,
app="app",
include_credentials=True,
)
response = client.accounts.list()
for item in response:
yield item
# alternatively, you can paginate page-by-page
Expand Down Expand Up @@ -160,8 +152,6 @@ def create(
client_secret="YOUR_CLIENT_SECRET",
)
client.accounts.create(
external_user_id="external_user_id",
oauth_app_id="oauth_app_id",
app_slug="app_slug",
cfmap_json="cfmap_json",
connect_token="connect_token",
Expand Down Expand Up @@ -215,7 +205,6 @@ def retrieve(
)
client.accounts.retrieve(
account_id="account_id",
include_credentials=True,
)
"""
_response = self._raw_client.retrieve(
Expand Down Expand Up @@ -363,15 +352,7 @@ async def list(


async def main() -> None:
response = await client.accounts.list(
external_user_id="external_user_id",
oauth_app_id="oauth_app_id",
after="after",
before="before",
limit=1,
app="app",
include_credentials=True,
)
response = await client.accounts.list()
async for item in response:
yield item

Expand Down Expand Up @@ -450,8 +431,6 @@ async def create(

async def main() -> None:
await client.accounts.create(
external_user_id="external_user_id",
oauth_app_id="oauth_app_id",
app_slug="app_slug",
cfmap_json="cfmap_json",
connect_token="connect_token",
Expand Down Expand Up @@ -513,7 +492,6 @@ async def retrieve(
async def main() -> None:
await client.accounts.retrieve(
account_id="account_id",
include_credentials=True,
)


Expand Down
16 changes: 2 additions & 14 deletions src/pipedream/actions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,7 @@ def list(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
response = client.actions.list(
after="after",
before="before",
limit=1,
q="q",
app="app",
)
response = client.actions.list()
for item in response:
yield item
# alternatively, you can paginate page-by-page
Expand Down Expand Up @@ -431,13 +425,7 @@ async def list(


async def main() -> None:
response = await client.actions.list(
after="after",
before="before",
limit=1,
q="q",
app="app",
)
response = await client.actions.list()
async for item in response:
yield item

Expand Down
4 changes: 2 additions & 2 deletions src/pipedream/actions/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ def run(
),
"dynamic_props_id": dynamic_props_id,
"stash_id": convert_and_respect_annotation_metadata(
object_=stash_id, annotation=RunActionOptsStashId, direction="write"
object_=stash_id, annotation=typing.Optional[RunActionOptsStashId], direction="write"
),
},
headers={
Expand Down Expand Up @@ -866,7 +866,7 @@ async def run(
),
"dynamic_props_id": dynamic_props_id,
"stash_id": convert_and_respect_annotation_metadata(
object_=stash_id, annotation=RunActionOptsStashId, direction="write"
object_=stash_id, annotation=typing.Optional[RunActionOptsStashId], direction="write"
),
},
headers={
Expand Down
18 changes: 2 additions & 16 deletions src/pipedream/apps/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@ def list(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
response = client.apps.list(
after="after",
before="before",
limit=1,
q="q",
sort_key="name",
sort_direction="asc",
)
response = client.apps.list()
for item in response:
yield item
# alternatively, you can paginate page-by-page
Expand Down Expand Up @@ -219,14 +212,7 @@ async def list(


async def main() -> None:
response = await client.apps.list(
after="after",
before="before",
limit=1,
q="q",
sort_key="name",
sort_direction="asc",
)
response = await client.apps.list()
async for item in response:
yield item

Expand Down
2 changes: 1 addition & 1 deletion src/pipedream/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
import typing

import httpx
from .types.project_environment import ProjectEnvironment
from .core.api_error import ApiError
from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
from .core.oauth_token_provider import OAuthTokenProvider
from .environment import PipedreamEnvironment
from .types.project_environment import ProjectEnvironment

if typing.TYPE_CHECKING:
from .accounts.client import AccountsClient, AsyncAccountsClient
Expand Down
18 changes: 2 additions & 16 deletions src/pipedream/components/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,7 @@ def list(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
)
response = client.components.list(
after="after",
before="before",
limit=1,
q="q",
app="app",
component_type="trigger",
)
response = client.components.list()
for item in response:
yield item
# alternatively, you can paginate page-by-page
Expand Down Expand Up @@ -379,14 +372,7 @@ async def list(


async def main() -> None:
response = await client.components.list(
after="after",
before="before",
limit=1,
q="q",
app="app",
component_type="trigger",
)
response = await client.components.list()
async for item in response:
yield item

Expand Down
4 changes: 2 additions & 2 deletions src/pipedream/core/client_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ def __init__(

def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
"User-Agent": "pipedream/1.0.11",
"User-Agent": "pipedream/1.0.12",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "pipedream",
"X-Fern-SDK-Version": "1.0.11",
"X-Fern-SDK-Version": "1.0.12",
**(self.get_custom_headers() or {}),
}
if self._project_environment is not None:
Expand Down
Loading