Skip to content

Commit

Permalink
Export rest_client.paginate to helpers.requests module
Browse files Browse the repository at this point in the history
  • Loading branch information
burnash committed Mar 25, 2024
1 parent a44c9b4 commit 4a31b34
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dlt/sources/helpers/requests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
from requests.exceptions import ChunkedEncodingError
from dlt.sources.helpers.requests.retry import Client
from dlt.sources.helpers.requests.session import Session
from dlt.sources.helpers.rest_client import paginate
from dlt.common.configuration.specs import RunConfiguration

client = Client()

get, post, put, patch, delete, options, head, request = (
get, post, put, patch, delete, options, head, request, paginate = (
client.get,
client.post,
client.put,
Expand All @@ -28,6 +29,7 @@
client.options,
client.head,
client.request,
paginate,
)


Expand Down
4 changes: 2 additions & 2 deletions tests/sources/helpers/rest_client/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import pytest
from typing import Any, cast
from dlt.common.typing import TSecretStrValue
from dlt.sources.helpers.requests import Response, Request
from dlt.sources.helpers.rest_client import RESTClient, paginate
from dlt.sources.helpers.requests import Response, Request, paginate
from dlt.sources.helpers.rest_client import RESTClient
from dlt.sources.helpers.rest_client.client import Hooks
from dlt.sources.helpers.rest_client.paginators import JSONResponsePaginator

Expand Down

0 comments on commit 4a31b34

Please sign in to comment.