From 4c23b12daa262cfebd8bc46e4a23f3a29da7e07b Mon Sep 17 00:00:00 2001 From: Di Wu Date: Fri, 25 Apr 2025 05:07:58 +0000 Subject: [PATCH] update pipedrive source with projects and tasks --- sources/pipedrive/__init__.py | 4 +++- sources/pipedrive/helpers/__init__.py | 3 +-- sources/pipedrive/helpers/custom_fields_munger.py | 2 +- sources/pipedrive/helpers/pages.py | 4 +--- sources/pipedrive/settings.py | 2 ++ 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/sources/pipedrive/__init__.py b/sources/pipedrive/__init__.py index 55615d0c7..e4dbd186a 100644 --- a/sources/pipedrive/__init__.py +++ b/sources/pipedrive/__init__.py @@ -9,7 +9,7 @@ To get an api key: https://pipedrive.readme.io/docs/how-to-find-the-api-token """ -from typing import Any, Dict, Iterator, List, Optional, Union, Iterable, Iterator, Tuple +from typing import Any, Dict, Iterator, List, Optional, Union, Iterator import dlt @@ -53,6 +53,8 @@ def pipedrive_source( stages users leads + projects + tasks For custom fields rename the `custom_fields_mapping` resource must be selected or loaded before other resources. diff --git a/sources/pipedrive/helpers/__init__.py b/sources/pipedrive/helpers/__init__.py index cd31b5788..f5af50288 100644 --- a/sources/pipedrive/helpers/__init__.py +++ b/sources/pipedrive/helpers/__init__.py @@ -1,7 +1,6 @@ """Pipedrive source helpers""" -from dlt.common import pendulum -from typing import Any, Iterable, Tuple, Dict, List, cast +from typing import Any, Iterable, Tuple, Dict, List from itertools import groupby diff --git a/sources/pipedrive/helpers/custom_fields_munger.py b/sources/pipedrive/helpers/custom_fields_munger.py index 8253668b2..b65a4e30e 100644 --- a/sources/pipedrive/helpers/custom_fields_munger.py +++ b/sources/pipedrive/helpers/custom_fields_munger.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Iterable, Iterator, TypedDict, Optional +from typing import Any, Dict, TypedDict, Optional import dlt diff --git a/sources/pipedrive/helpers/pages.py b/sources/pipedrive/helpers/pages.py index 916876c6d..1fa82be52 100644 --- a/sources/pipedrive/helpers/pages.py +++ b/sources/pipedrive/helpers/pages.py @@ -1,12 +1,10 @@ -from itertools import chain, groupby +from itertools import chain from typing import ( Any, Dict, Iterable, Iterator, List, - Optional, - Sequence, TypeVar, Union, ) diff --git a/sources/pipedrive/settings.py b/sources/pipedrive/settings.py index 8e5c12f63..86c43bce5 100644 --- a/sources/pipedrive/settings.py +++ b/sources/pipedrive/settings.py @@ -22,6 +22,8 @@ "organization": "organizations", "pipeline": "pipelines", "product": "products", + "project": "projects", "stage": "stages", + "task": "tasks", "user": "users", }