-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Bacground
The timeouts documentation shows setting a timeout at the client level: https://github.com/PipedreamHQ/pipedream-sdk-python?tab=readme-ov-file#timeouts
However, passing timeout to the constructor raises:
TypeError: Pipedream.__init__() got an unexpected keyword argument 'timeout'
Steps to Reproduce
from pipedream import Pipedream
client = Pipedream(
project_id=settings.PIPEDREAM_PROJECT_ID,
timeout=5, # This causes the error
)
This also happens for AsyncPipedream.
Expected Behavior
The timeout parameter should be accepted and set a default timeout for all API calls made through the client instance.
Actual Behavior
TypeError is raised indicating timeout is not a valid parameter.
Workaround
Using pipedream.client.Client directly instead of the higher-level pipedream.Pipedream class. The lower-level class accepts the timeout parameter:
client = Client(
project_id=settings.PIPEDREAM_PROJECT_ID,
timeout=5,
)
This works, but requires:
- Using the lower-level client class instead of the documented
Pipedreamclass - Accessing the token via
client._client_wrapper._get_token()instead of theraw_access_tokenproperty (which is only available onPipedream)
Metadata
Metadata
Assignees
Labels
No labels