airbyte-source-shopify 2.5.13__py3-none-any.whl → 2.5.14__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-source-shopify
3
- Version: 2.5.13
3
+ Version: 2.5.14
4
4
  Summary: Source CDK implementation for Shopify.
5
5
  Home-page: https://airbyte.com
6
6
  License: ELv2
@@ -1,7 +1,7 @@
1
1
  source_shopify/__init__.py,sha256=5B0YAA_u4-fd9f_BIjHzGhaWKAnmW7VZz3rOWr13org,1136
2
- source_shopify/auth.py,sha256=PsijRnG9LFXeUk7sFRdo60seFeT1uhtxekvHsHC-I6Y,1538
3
- source_shopify/config_migrations.py,sha256=x8WVmHKx1AtfaUxY-Ck_qHNLkvNN0aZlfuXf03ob73I,3908
4
- source_shopify/http_request.py,sha256=36nj-Pejjk6b3LtNdyWodV4c-4RkkmPOVoLmNclC-nQ,2288
2
+ source_shopify/auth.py,sha256=kGCDGkwrKCIpCv60j-1NbRIL9Pn4XmxUbKxP6RkMClQ,1537
3
+ source_shopify/config_migrations.py,sha256=7WS8kuLRYzxhA8ldmX9kEXlowYcnlOpi63DLg1LCExQ,3909
4
+ source_shopify/http_request.py,sha256=eMknu-NB3oAwcgm8oWyHS0Vbub9PlbwGzhhetenb5TM,2290
5
5
  source_shopify/run.py,sha256=K_HTghvJVfQaR3pMtCel5CdLROKKj-KbFSKVAdyquOk,398
6
6
  source_shopify/schemas/abandoned_checkouts.json,sha256=nlYpb8VOQCO8wuHWM8gWhlzzj97NWV9gL2vpUbUl-FU,28417
7
7
  source_shopify/schemas/articles.json,sha256=tGnbM4lI2jA8joevDsrd-mQJksO2lLG3dIJGpxeuoYs,2548
@@ -50,24 +50,24 @@ source_shopify/schemas/shop.json,sha256=vEGiTvEYX7qnMq06MRVBycqih49h49xjTNC6gJux
50
50
  source_shopify/schemas/smart_collections.json,sha256=kv7dINsvgzJ0RyKfFNKjU0apdNDXwQaHfnNZfQsshcU,2009
51
51
  source_shopify/schemas/tender_transactions.json,sha256=U8fdT-eflycEPzYSpBDiB0lp9wxmJHgioHTrICflh78,2006
52
52
  source_shopify/schemas/transactions.json,sha256=vbwscH3UcAtbSsC70mBka4oNaFR4S3S6IFBmzR7t37U,10226
53
- source_shopify/scopes.py,sha256=K1lH6ZsdOo4YkEnHaQm8d1RlK2E4PFNsLczomchc6jk,6533
53
+ source_shopify/scopes.py,sha256=PfqovbAvu_HZPim2kWQQUe-2rZ80Aq5yHPfNbHP87gA,6534
54
54
  source_shopify/shopify_graphql/bulk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
55
  source_shopify/shopify_graphql/bulk/exceptions.py,sha256=4dj7Za4xIfwL-zf8joT9svF_RSoGlE3GviMiIl1e1rs,2532
56
- source_shopify/shopify_graphql/bulk/job.py,sha256=jR0BGVtMWBZPfAL-_rNvY4qgYE3CjPV4i-uUNWITdjQ,27634
57
- source_shopify/shopify_graphql/bulk/query.py,sha256=tktkNYD3dCEPkod1OvXRckV3oEKF3X5ja32UTCow4KI,121669
56
+ source_shopify/shopify_graphql/bulk/job.py,sha256=_GL2WXK23yJjYcnOzuiBgpBxvng3RF_ezPhl265puz4,27635
57
+ source_shopify/shopify_graphql/bulk/query.py,sha256=a2gkdP7ElP1eedGvXN2_OxjuX3fT5kB_4ZyA4lO9S5Q,121668
58
58
  source_shopify/shopify_graphql/bulk/record.py,sha256=X6VGngugv7a_S8UEeDo121BkdCVLj5nWlHK76A21kyo,16898
59
- source_shopify/shopify_graphql/bulk/retry.py,sha256=4ICAWM74C4XHsbPNkztXA80NI48bMGD2Gsz89GmqBTU,2625
59
+ source_shopify/shopify_graphql/bulk/retry.py,sha256=R5rSJJE8D5zcj6mN-OmmNO2aFZEIdjAlWclDDVW5KPI,2626
60
60
  source_shopify/shopify_graphql/bulk/status.py,sha256=RmuQ2XsYL3iRCpVGxea9F1wXGmbwasDCSXjaTyL4LMA,328
61
- source_shopify/shopify_graphql/bulk/tools.py,sha256=g8-7NHHh1hlCWjUaLaxCxG2jR-WLMgBxf3vIhEyqkJE,4064
62
- source_shopify/shopify_graphql/graphql.py,sha256=wHzppRm2zbllOp1m4zCax6SY6xo3aYnwlwIScRVk10Q,1969
63
- source_shopify/shopify_graphql/schema.py,sha256=H3qj3AFjaKJ4Nsd2GlyNCQEOulDFrkQWvO00Ad3fqbY,1354903
64
- source_shopify/source.py,sha256=c_Z6ynQ8yrAjgvalD0nrDUqPkdBNDxtfjKYF6q_UGzk,8568
61
+ source_shopify/shopify_graphql/bulk/tools.py,sha256=nUQ2ZmPTKJNJdfLToR6KJtLKcJFCChSifkAOvwg0Vss,4065
62
+ source_shopify/shopify_graphql/graphql.py,sha256=aJccSbPQKrmhq61KHUfYG94GzRsaPUwHaLZiNcFxjf0,1970
63
+ source_shopify/shopify_graphql/schema.py,sha256=ICPxr0MWsmAUZjOWCx_zRbSNourHznKNDcWX5y_x-RM,1354904
64
+ source_shopify/source.py,sha256=_anfEQKazPlSV9yOqlOXhSVQfuoc1wL-w4HOYm2nFso,8569
65
65
  source_shopify/spec.json,sha256=ITYWiQ-NrI5VISk5qmUQhp9ChUE2FV18d8xzVzPwvAg,6144
66
- source_shopify/streams/base_streams.py,sha256=rreQGHrt_3CBdBmJ6Hq41GS10UDi1pWQMTZoeU-hTbk,40490
67
- source_shopify/streams/streams.py,sha256=MTsy1fGBWV6ZGYfjE-mx7rT-eXLOngyGSYJeUhiE6po,12056
66
+ source_shopify/streams/base_streams.py,sha256=-Yww6tSot5xG4MSwSK2JWHjR3DDFYM9q5Lw3GAKDNsc,40491
67
+ source_shopify/streams/streams.py,sha256=AhB73104HJNLWDTSgLdCJWcEoqsO3KxnBccOzeGNUmI,12056
68
68
  source_shopify/transform.py,sha256=mn0htL812_90zc_YszGQa0hHcIZQpYYdmk8IqpZm5TI,4685
69
- source_shopify/utils.py,sha256=l6BhCtzcZbAd9DMpeXHHHhkPnERNNx4rfS1DuH53w0k,14460
70
- airbyte_source_shopify-2.5.13.dist-info/METADATA,sha256=qaxVwN0uxaVCyr-9Gv5sA1rOVDb5Ypq9cEPCkhjOL6g,5257
71
- airbyte_source_shopify-2.5.13.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
72
- airbyte_source_shopify-2.5.13.dist-info/entry_points.txt,sha256=SyTwKSsPk9MCdPf01saWpnp8hcmZOgBssVcSIvMbBeQ,57
73
- airbyte_source_shopify-2.5.13.dist-info/RECORD,,
69
+ source_shopify/utils.py,sha256=GOIIL_UVHfgkrfI5CbDkSQi92qdgcbcGEFyZQ_A78KE,14463
70
+ airbyte_source_shopify-2.5.14.dist-info/METADATA,sha256=EhYEtZ-OAW4q_7wYdbOexoyTF4dDG4e5IFl7lhEqlac,5257
71
+ airbyte_source_shopify-2.5.14.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
72
+ airbyte_source_shopify-2.5.14.dist-info/entry_points.txt,sha256=SyTwKSsPk9MCdPf01saWpnp8hcmZOgBssVcSIvMbBeQ,57
73
+ airbyte_source_shopify-2.5.14.dist-info/RECORD,,
source_shopify/auth.py CHANGED
@@ -25,7 +25,6 @@ class NotImplementedAuth(Exception):
25
25
 
26
26
 
27
27
  class ShopifyAuthenticator(TokenAuthenticator):
28
-
29
28
  """
30
29
  Making Authenticator to be able to accept Header-Based authentication.
31
30
  """
@@ -5,12 +5,13 @@
5
5
 
6
6
  from typing import Any, List, Mapping
7
7
 
8
+ from orjson import orjson
9
+
8
10
  from airbyte_cdk.config_observation import create_connector_config_control_message
9
11
  from airbyte_cdk.entrypoint import AirbyteEntrypoint
10
12
  from airbyte_cdk.models import AirbyteMessageSerializer
11
13
  from airbyte_cdk.sources import Source
12
14
  from airbyte_cdk.sources.message import InMemoryMessageRepository, MessageRepository
13
- from orjson import orjson
14
15
 
15
16
 
16
17
  class MigrateConfig:
@@ -3,9 +3,11 @@
3
3
  from typing import Optional, Union
4
4
 
5
5
  import requests
6
+ from requests import exceptions
7
+
6
8
  from airbyte_cdk.models import FailureType
7
9
  from airbyte_cdk.sources.streams.http.error_handlers import ErrorHandler, ErrorResolution, ResponseAction
8
- from requests import exceptions
10
+
9
11
 
10
12
  RESPONSE_CONSUMPTION_EXCEPTIONS = (
11
13
  exceptions.ChunkedEncodingError,
source_shopify/scopes.py CHANGED
@@ -7,12 +7,14 @@ import logging
7
7
  from typing import Any, Iterable, List, Mapping, Optional
8
8
 
9
9
  import requests
10
- from airbyte_cdk.sources.streams.http import HttpClient
11
10
  from requests.exceptions import InvalidURL, JSONDecodeError
12
11
 
12
+ from airbyte_cdk.sources.streams.http import HttpClient
13
+
13
14
  from .http_request import ShopifyErrorHandler
14
15
  from .utils import ShopifyAccessScopesError, ShopifyBadJsonError, ShopifyWrongShopNameError
15
16
 
17
+
16
18
  SCOPES_MAPPING: Mapping[str, set[str]] = {
17
19
  # SCOPE: read_customers
18
20
  "Customers": ("read_customers",),
@@ -82,7 +84,6 @@ ALWAYS_PERMITTED_STREAMS: List[str] = [
82
84
 
83
85
 
84
86
  class ShopifyScopes:
85
-
86
87
  # define default logger
87
88
  logger = logging.getLogger("airbyte")
88
89
 
@@ -9,11 +9,12 @@ from typing import Any, Final, Iterable, List, Mapping, Optional
9
9
 
10
10
  import pendulum as pdm
11
11
  import requests
12
- from airbyte_cdk.sources.streams.http import HttpClient
13
12
  from requests.exceptions import JSONDecodeError
14
13
  from source_shopify.utils import LOGGER, ApiTypeEnum
15
14
  from source_shopify.utils import ShopifyRateLimiter as limiter
16
15
 
16
+ from airbyte_cdk.sources.streams.http import HttpClient
17
+
17
18
  from .exceptions import AirbyteTracedException, ShopifyBulkExceptions
18
19
  from .query import ShopifyBulkQuery, ShopifyBulkTemplates
19
20
  from .record import ShopifyBulkRecord
@@ -2562,7 +2562,6 @@ class ProductVariant(ShopifyBulkQuery):
2562
2562
 
2563
2563
  @property
2564
2564
  def query_nodes(self) -> Optional[Union[List[Field], List[str]]]:
2565
-
2566
2565
  prices_fields: List[str] = ["amount", "currencyCode"]
2567
2566
  presentment_prices_fields: List[Field] = [
2568
2567
  Field(
@@ -8,6 +8,7 @@ from source_shopify.utils import LOGGER
8
8
 
9
9
  from .exceptions import ShopifyBulkExceptions
10
10
 
11
+
11
12
  BULK_RETRY_ERRORS: Final[Tuple] = (
12
13
  ShopifyBulkExceptions.BulkJobBadResponse,
13
14
  ShopifyBulkExceptions.BulkJobError,
@@ -11,6 +11,7 @@ import pendulum as pdm
11
11
 
12
12
  from .exceptions import ShopifyBulkExceptions
13
13
 
14
+
14
15
  # default end line tag
15
16
  END_OF_FILE: str = "<end_of_file>"
16
17
  BULK_PARENT_KEY: str = "__parentId"
@@ -9,6 +9,7 @@ import sgqlc.operation
9
9
 
10
10
  from . import schema
11
11
 
12
+
12
13
  _schema = schema
13
14
  _schema_root = _schema.shopify_schema
14
15
 
@@ -7,6 +7,7 @@ import sgqlc.types
7
7
  import sgqlc.types.datetime
8
8
  import sgqlc.types.relay
9
9
 
10
+
10
11
  shopify_schema = sgqlc.types.Schema()
11
12
 
12
13
 
source_shopify/source.py CHANGED
@@ -6,11 +6,12 @@
6
6
  import logging
7
7
  from typing import Any, List, Mapping, Tuple
8
8
 
9
+ from requests.exceptions import ConnectionError, RequestException, SSLError
10
+
9
11
  from airbyte_cdk.models import FailureType, SyncMode
10
12
  from airbyte_cdk.sources import AbstractSource
11
13
  from airbyte_cdk.sources.streams import Stream
12
14
  from airbyte_cdk.utils import AirbyteTracedException
13
- from requests.exceptions import ConnectionError, RequestException, SSLError
14
15
 
15
16
  from .auth import MissingAccessTokenError, ShopifyAuthenticator
16
17
  from .scopes import ShopifyScopes
@@ -12,11 +12,6 @@ from urllib.parse import parse_qsl, urlparse
12
12
 
13
13
  import pendulum as pdm
14
14
  import requests
15
- from airbyte_cdk.models import SyncMode
16
- from airbyte_cdk.sources.streams.core import StreamData
17
- from airbyte_cdk.sources.streams.http import HttpClient, HttpStream
18
- from airbyte_cdk.sources.streams.http.error_handlers import ErrorHandler, HttpStatusErrorHandler
19
- from airbyte_cdk.sources.streams.http.error_handlers.default_error_mapping import DEFAULT_ERROR_MAPPING
20
15
  from requests.exceptions import RequestException
21
16
  from source_shopify.http_request import ShopifyErrorHandler
22
17
  from source_shopify.shopify_graphql.bulk.job import ShopifyBulkManager
@@ -26,6 +21,12 @@ from source_shopify.utils import EagerlyCachedStreamState as stream_state_cache
26
21
  from source_shopify.utils import ShopifyNonRetryableErrors
27
22
  from source_shopify.utils import ShopifyRateLimiter as limiter
28
23
 
24
+ from airbyte_cdk.models import SyncMode
25
+ from airbyte_cdk.sources.streams.core import StreamData
26
+ from airbyte_cdk.sources.streams.http import HttpClient, HttpStream
27
+ from airbyte_cdk.sources.streams.http.error_handlers import ErrorHandler, HttpStatusErrorHandler
28
+ from airbyte_cdk.sources.streams.http.error_handlers.default_error_mapping import DEFAULT_ERROR_MAPPING
29
+
29
30
 
30
31
  class ShopifyStream(HttpStream, ABC):
31
32
  # define default logger
@@ -6,8 +6,6 @@
6
6
  from typing import Any, Iterable, Mapping, MutableMapping, Optional
7
7
 
8
8
  import requests
9
- from airbyte_cdk.sources.streams.core import package_name_from_class
10
- from airbyte_cdk.sources.utils.schema_helpers import ResourceSchemaLoader
11
9
  from requests.exceptions import RequestException
12
10
  from source_shopify.shopify_graphql.bulk.query import (
13
11
  Collection,
@@ -36,6 +34,9 @@ from source_shopify.shopify_graphql.graphql import get_query_products
36
34
  from source_shopify.utils import ApiTypeEnum
37
35
  from source_shopify.utils import ShopifyRateLimiter as limiter
38
36
 
37
+ from airbyte_cdk.sources.streams.core import package_name_from_class
38
+ from airbyte_cdk.sources.utils.schema_helpers import ResourceSchemaLoader
39
+
39
40
  from .base_streams import (
40
41
  IncrementalShopifyGraphQlBulkStream,
41
42
  IncrementalShopifyNestedStream,
@@ -249,7 +250,6 @@ class MetafieldCollections(IncrementalShopifyGraphQlBulkStream):
249
250
 
250
251
 
251
252
  class BalanceTransactions(IncrementalShopifyStream):
252
-
253
253
  """
254
254
  PaymentsTransactions stream does not support Incremental Refresh based on datetime fields, only `since_id` is supported:
255
255
  https://shopify.dev/api/admin-rest/2021-07/resources/transactions
source_shopify/utils.py CHANGED
@@ -10,10 +10,12 @@ from time import sleep
10
10
  from typing import Any, Callable, Dict, Final, List, Mapping, Optional
11
11
 
12
12
  import requests
13
+
13
14
  from airbyte_cdk.models import FailureType
14
15
  from airbyte_cdk.sources.streams.http.error_handlers.response_models import ErrorResolution, ResponseAction
15
16
  from airbyte_cdk.utils import AirbyteTracedException
16
17
 
18
+
17
19
  # default logger instance
18
20
  LOGGER: Final[logging.Logger] = logging.getLogger("airbyte")
19
21
 
@@ -47,7 +49,7 @@ class ShopifyNonRetryableErrors:
47
49
  response_action=ResponseAction.IGNORE,
48
50
  failure_type=FailureType.config_error,
49
51
  error_message=f"Stream `{stream}`. Entity might not be available or missing.",
50
- )
52
+ ),
51
53
  # extend the mapping with more handable errors, if needed.
52
54
  }
53
55