Skip to content

timeout parameter not accepted in Pipedream constructor despite documentation #244

@johnnymetz

Description

@johnnymetz

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 Pipedream class
  • Accessing the token via client._client_wrapper._get_token() instead of the raw_access_token property (which is only available on Pipedream)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions