airbyte-source-google-search-console 1.5.16.dev202505021903__py3-none-any.whl → 1.5.17__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,19 +1,19 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: airbyte-source-google-search-console
3
- Version: 1.5.16.dev202505021903
3
+ Version: 1.5.17
4
4
  Summary: Source implementation for Google Search Console.
5
5
  License: Elv2
6
6
  Author: Airbyte
7
7
  Author-email: contact@airbyte.io
8
- Requires-Python: >=3.9,<3.12
8
+ Requires-Python: >=3.10,<3.12
9
9
  Classifier: License :: Other/Proprietary License
10
10
  Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.9
12
11
  Classifier: Programming Language :: Python :: 3.10
13
12
  Classifier: Programming Language :: Python :: 3.11
14
- Requires-Dist: airbyte-cdk (>=1,<2)
13
+ Requires-Dist: airbyte-cdk (>=6,<7)
15
14
  Requires-Dist: google-api-python-client (==2.105.0)
16
15
  Requires-Dist: google-auth (==2.23.3)
16
+ Requires-Dist: pendulum (>=3.1.0,<4.0.0)
17
17
  Project-URL: Documentation, https://docs.airbyte.com/integrations/sources/google-search-console
18
18
  Project-URL: Homepage, https://airbyte.com
19
19
  Project-URL: Repository, https://github.com/airbytehq/airbyte
@@ -1,5 +1,5 @@
1
1
  source_google_search_console/__init__.py,sha256=HQCPu-CK7XmVDtP9rmTdB2XyraVCc6pv9pw38-O8y48,1191
2
- source_google_search_console/config_migrations.py,sha256=9C8QoELMAxt8NHiEY4fZMCYy5PwoOSUd6vSwoC1B3FM,4135
2
+ source_google_search_console/config_migrations.py,sha256=Cl4SUdJpAf6wMM_vVhqjjU89NfUq9LIGJ9zNrWiBk-A,4235
3
3
  source_google_search_console/exceptions.py,sha256=iD3jYC4WxVCEKGsqQ7Vaj1tbjhJZ4S5mnSDnwFJdsIQ,1097
4
4
  source_google_search_console/run.py,sha256=q6O2iXoxtrdgtodCaanqTO2eKzUvXF2iDCfmCxaPE24,462
5
5
  source_google_search_console/schemas/search_analytics_all_fields.json,sha256=iQxRh_c_yz3uGofqpo1KX571TMmzYjKScb0PtI6SN_Q,1729
@@ -17,10 +17,10 @@ source_google_search_console/schemas/search_analytics_site_report_by_site.json,s
17
17
  source_google_search_console/schemas/sitemaps.json,sha256=coyPSZCAfzMheybfRp4WPAZCp5JF2KGRF2rWK8oC080,1775
18
18
  source_google_search_console/schemas/sites.json,sha256=WNiCRuStPL1YkJiFa8FEbNJmqaERAOf9Yow6ygIumvo,383
19
19
  source_google_search_console/service_account_authenticator.py,sha256=gjUxt0xFxj82uviCQNTsA1Jlee__UDhYNjE7bRO1G0U,1227
20
- source_google_search_console/source.py,sha256=Dv6es7XWq-eTinrjUI7wAsUU49mOlYsRiXh_OzqNkW4,10204
21
- source_google_search_console/spec.json,sha256=2fFxbgga6veaSiQyfkoyAtVraSk8FgSGjDyT7T5ctBQ,8764
22
- source_google_search_console/streams.py,sha256=E2Ib6AU0V5LCmA846_7ekIOmsrV2KX8VONWXMdhB3pc,19917
23
- airbyte_source_google_search_console-1.5.16.dev202505021903.dist-info/METADATA,sha256=13H2rlconrDe1NF9D_0a8lOgT4N09qaNlLQesbFRMMU,5646
24
- airbyte_source_google_search_console-1.5.16.dev202505021903.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
25
- airbyte_source_google_search_console-1.5.16.dev202505021903.dist-info/entry_points.txt,sha256=DMcgc9bCX-Vt6hm_68pa77qS3eGdeMhg-UdlFc-XKUM,85
26
- airbyte_source_google_search_console-1.5.16.dev202505021903.dist-info/RECORD,,
20
+ source_google_search_console/source.py,sha256=8n10_agSa2rvPvEyBvOfOpmpEardbEhi3H0vlK2A4_g,10002
21
+ source_google_search_console/spec.json,sha256=WYtFvaSqWYGm1Dt2yV9G92U78Q94rh9oarbxJe3H7xo,8470
22
+ source_google_search_console/streams.py,sha256=WyClF4v6w5ZdYL9Ses_ITBzMNd6CQLaNKU64HtFMcfE,19920
23
+ airbyte_source_google_search_console-1.5.17.dist-info/METADATA,sha256=_Li00CZRIE5xrS4lhgd4Oz9pR5qpSpaKcuWLaO8wwdI,5622
24
+ airbyte_source_google_search_console-1.5.17.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
25
+ airbyte_source_google_search_console-1.5.17.dist-info/entry_points.txt,sha256=DMcgc9bCX-Vt6hm_68pa77qS3eGdeMhg-UdlFc-XKUM,85
26
+ airbyte_source_google_search_console-1.5.17.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: poetry-core 2.1.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -6,8 +6,11 @@
6
6
  import logging
7
7
  from typing import Any, List, Mapping
8
8
 
9
+ import orjson
10
+
9
11
  from airbyte_cdk.config_observation import create_connector_config_control_message
10
12
  from airbyte_cdk.entrypoint import AirbyteEntrypoint
13
+ from airbyte_cdk.models import AirbyteMessageSerializer
11
14
  from airbyte_cdk.sources import Source
12
15
  from airbyte_cdk.sources.message import InMemoryMessageRepository, MessageRepository
13
16
 
@@ -77,7 +80,7 @@ class MigrateCustomReports:
77
80
  cls.message_repository.emit_message(create_connector_config_control_message(migrated_config))
78
81
  # emit the Airbyte Control Message from message queue to stdout
79
82
  for message in cls.message_repository._message_queue:
80
- print(message.json(exclude_unset=True))
83
+ print(orjson.dumps(AirbyteMessageSerializer.dump(message)).decode())
81
84
 
82
85
  @classmethod
83
86
  def migrate(cls, args: List[str], source: Source) -> None:
@@ -49,7 +49,6 @@ custom_reports_schema = {
49
49
  "properties": {
50
50
  "name": {"type": "string", "minLength": 1},
51
51
  "dimensions": {"type": "array", "items": {"type": "string", "minLength": 1}},
52
- "aggregation_type": {"type": "string", "enum": ["auto", "by_page", "by_property"], "default": "auto"},
53
52
  },
54
53
  "required": ["name", "dimensions"],
55
54
  },
@@ -196,9 +195,7 @@ class SourceGoogleSearchConsole(AbstractSource):
196
195
 
197
196
  def get_custom_reports(self, config: Mapping[str, Any], stream_config: Mapping[str, Any]) -> List[Optional[Stream]]:
198
197
  return [
199
- type(report["name"], (SearchAnalyticsByCustomDimensions,), {})(
200
- dimensions=report["dimensions"], aggregation_type=report.get("aggregation_type", "auto"), **stream_config
201
- )
198
+ type(report["name"], (SearchAnalyticsByCustomDimensions,), {})(dimensions=report["dimensions"], **stream_config)
202
199
  for report in config.get("custom_reports_array", [])
203
200
  ]
204
201
 
@@ -144,13 +144,6 @@
144
144
  },
145
145
  "default": ["date"],
146
146
  "minItems": 0
147
- },
148
- "aggregation_type": {
149
- "title": "Aggregation Type",
150
- "description": "The type of aggregation to apply to the report.",
151
- "type": "string",
152
- "enum": ["auto", "by_page", "by_property"],
153
- "default": "auto"
154
147
  }
155
148
  },
156
149
  "required": ["name", "dimensions"]
@@ -81,7 +81,7 @@ class GoogleSearchConsole(HttpStream, ABC):
81
81
  self.logger.error(f"Stream `{self.name}`. {error.get('message')}. Trying with `aggregationType = auto` instead.")
82
82
  self.aggregation_type = QueryAggregationType.auto
83
83
  setattr(self, "raise_on_http_errors", False)
84
- return super().should_retry(response)
84
+ return response.status_code == 429 or 500 <= response.status_code < 600
85
85
 
86
86
 
87
87
  class Sites(GoogleSearchConsole):
@@ -90,6 +90,7 @@ class Sites(GoogleSearchConsole):
90
90
  """
91
91
 
92
92
  primary_key = None
93
+ is_resumable = False
93
94
 
94
95
  def path(
95
96
  self,
@@ -107,6 +108,7 @@ class Sitemaps(GoogleSearchConsole):
107
108
 
108
109
  primary_key = None
109
110
  data_field = "sitemap"
111
+ is_resumable = False
110
112
 
111
113
  def path(
112
114
  self,
@@ -384,7 +386,7 @@ class SearchByKeyword(SearchAnalytics):
384
386
  def stream_slices(
385
387
  self, sync_mode: SyncMode, cursor_field: List[str] = None, stream_state: Mapping[str, Any] = None
386
388
  ) -> Iterable[Optional[Mapping[str, Any]]]:
387
- search_appearance_stream = SearchAppearance(self._session.auth, self._site_urls, self._start_date, self._end_date)
389
+ search_appearance_stream = SearchAppearance(self._http_client._session.auth, self._site_urls, self._start_date, self._end_date)
388
390
 
389
391
  for stream_slice in super().stream_slices(sync_mode, cursor_field, stream_state):
390
392
  keywords_records = search_appearance_stream.read_records(
@@ -458,10 +460,9 @@ class SearchAnalyticsByCustomDimensions(SearchAnalytics):
458
460
 
459
461
  primary_key = None
460
462
 
461
- def __init__(self, dimensions: List[str], aggregation_type: str, *args, **kwargs):
463
+ def __init__(self, dimensions: List[str], *args, **kwargs):
462
464
  super(SearchAnalyticsByCustomDimensions, self).__init__(*args, **kwargs)
463
465
  self.dimensions = dimensions + [dimension for dimension in self.DEFAULT_DIMENSIONS if dimension not in dimensions]
464
- self.aggregation_type = QueryAggregationType[aggregation_type]
465
466
  # Assign the dimensions as PK for the custom report stream.
466
467
  # Site URL and Search Type are included in the API call thus affect the resulting data.
467
468
  # `site_url` is a required URL param for making API calls;