logos-sdk 0.0.24.dev1__tar.gz → 0.0.25.dev2__tar.gz
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.
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/PKG-INFO +3 -2
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/README.md +2 -1
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/GoogleAds.py +17 -2
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk.egg-info/PKG-INFO +3 -2
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/LICENSE +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/__init__.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/big_query/BigQuery.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/big_query/__init__.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/logging/LogosLogger.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/logging/__init__.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/CampaignManager.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/Collabim.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/DV360.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/Facebook.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/GoogleSheets.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/MarketMiner.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/MerchantCenter.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/MicrosoftAdvertising.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/Sklik.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk/services/__init__.py +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk.egg-info/SOURCES.txt +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk.egg-info/dependency_links.txt +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk.egg-info/requires.txt +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/logos_sdk.egg-info/top_level.txt +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/setup.cfg +0 -0
- {logos_sdk-0.0.24.dev1 → logos_sdk-0.0.25.dev2}/setup.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: logos-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.25.dev2
|
|
4
4
|
Summary: SDK for Logos platform
|
|
5
5
|
Home-page: https://bitbucket.org/databy/logos-sdk-pip/src/master/
|
|
6
6
|
Author: Databy.io
|
|
@@ -243,10 +243,11 @@ Development of new features/refactor/debug follow the naming convention of:
|
|
|
243
243
|
```
|
|
244
244
|
|
|
245
245
|
Pull requests are directed do the current development branch, which always bears the number of the newest version, for example `development-0.0.2`. After adding a major feature, or a number of less significant refactors and hot-fixes, the current development branch is merged into master and deployed into Google Artifact Registry. The old development branch is then deleted and a new branch with the following version `development-0.0.3` will be created. Version is not controled throught an env variable VERSION.
|
|
246
|
+
For fixing minor bugs, dev version is used, e.g 0.0.24.dev1
|
|
246
247
|
|
|
247
248
|
Manual build, with optional build number
|
|
248
249
|
```
|
|
249
|
-
export VERSION=x.x.x
|
|
250
|
+
export VERSION=x.x.x.dev[x]
|
|
250
251
|
python setup.py sdist bdist_wheel --build-number=$BUILD_NUMBER
|
|
251
252
|
```
|
|
252
253
|
|
|
@@ -221,10 +221,11 @@ Development of new features/refactor/debug follow the naming convention of:
|
|
|
221
221
|
```
|
|
222
222
|
|
|
223
223
|
Pull requests are directed do the current development branch, which always bears the number of the newest version, for example `development-0.0.2`. After adding a major feature, or a number of less significant refactors and hot-fixes, the current development branch is merged into master and deployed into Google Artifact Registry. The old development branch is then deleted and a new branch with the following version `development-0.0.3` will be created. Version is not controled throught an env variable VERSION.
|
|
224
|
+
For fixing minor bugs, dev version is used, e.g 0.0.24.dev1
|
|
224
225
|
|
|
225
226
|
Manual build, with optional build number
|
|
226
227
|
```
|
|
227
|
-
export VERSION=x.x.x
|
|
228
|
+
export VERSION=x.x.x.dev[x]
|
|
228
229
|
python setup.py sdist bdist_wheel --build-number=$BUILD_NUMBER
|
|
229
230
|
```
|
|
230
231
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
from requests import request
|
|
2
|
+
from requests.exceptions import Timeout
|
|
2
3
|
from typing import List, Union, Dict
|
|
3
4
|
from logos_sdk.services import get_headers
|
|
4
5
|
from http import HTTPStatus
|
|
5
6
|
from dotenv import load_dotenv
|
|
6
7
|
import os
|
|
8
|
+
import time
|
|
9
|
+
import random
|
|
7
10
|
|
|
8
11
|
|
|
9
12
|
class GoogleAdsServiceException(Exception):
|
|
@@ -19,6 +22,18 @@ class GoogleAdsService:
|
|
|
19
22
|
self._EXCLUDE_FOR_ACCOUNT = self._URL + "/exclude-for-account"
|
|
20
23
|
self._EXCLUDE_FOR_AD_GROUP = self._URL + "/exclude-for-ad-group"
|
|
21
24
|
|
|
25
|
+
@staticmethod
|
|
26
|
+
def fetch_with_retry_on_timeout(url, json, headers):
|
|
27
|
+
for attempt in range(5):
|
|
28
|
+
try:
|
|
29
|
+
return request("post", url, json=json, headers=headers, timeout=25)
|
|
30
|
+
except Timeout:
|
|
31
|
+
delay = 2 * (2 ** attempt) + random.randint(0, 9)
|
|
32
|
+
print(f"there was a timeout when contacting the service, going to sleep for {delay} seconds")
|
|
33
|
+
time.sleep(delay)
|
|
34
|
+
|
|
35
|
+
raise Exception("The service is not able to reply within 30 seconds.")
|
|
36
|
+
|
|
22
37
|
def search_stream(
|
|
23
38
|
self,
|
|
24
39
|
query: str,
|
|
@@ -38,7 +53,7 @@ class GoogleAdsService:
|
|
|
38
53
|
}
|
|
39
54
|
|
|
40
55
|
header = get_headers(self._SEARCH_STREAM)
|
|
41
|
-
response =
|
|
56
|
+
response = self.fetch_with_retry_on_timeout(url=self._SEARCH_STREAM, json=body, headers=header)
|
|
42
57
|
|
|
43
58
|
if response.status_code == HTTPStatus.OK:
|
|
44
59
|
service_response = response.json()
|
|
@@ -69,7 +84,7 @@ class GoogleAdsService:
|
|
|
69
84
|
}
|
|
70
85
|
|
|
71
86
|
header = get_headers(self._SEARCH)
|
|
72
|
-
response =
|
|
87
|
+
response = self.fetch_with_retry_on_timeout(url=self._SEARCH, json=body, headers=header)
|
|
73
88
|
|
|
74
89
|
if response.status_code != HTTPStatus.OK:
|
|
75
90
|
raise GoogleAdsServiceException(response.content)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: logos-sdk
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.25.dev2
|
|
4
4
|
Summary: SDK for Logos platform
|
|
5
5
|
Home-page: https://bitbucket.org/databy/logos-sdk-pip/src/master/
|
|
6
6
|
Author: Databy.io
|
|
@@ -243,10 +243,11 @@ Development of new features/refactor/debug follow the naming convention of:
|
|
|
243
243
|
```
|
|
244
244
|
|
|
245
245
|
Pull requests are directed do the current development branch, which always bears the number of the newest version, for example `development-0.0.2`. After adding a major feature, or a number of less significant refactors and hot-fixes, the current development branch is merged into master and deployed into Google Artifact Registry. The old development branch is then deleted and a new branch with the following version `development-0.0.3` will be created. Version is not controled throught an env variable VERSION.
|
|
246
|
+
For fixing minor bugs, dev version is used, e.g 0.0.24.dev1
|
|
246
247
|
|
|
247
248
|
Manual build, with optional build number
|
|
248
249
|
```
|
|
249
|
-
export VERSION=x.x.x
|
|
250
|
+
export VERSION=x.x.x.dev[x]
|
|
250
251
|
python setup.py sdist bdist_wheel --build-number=$BUILD_NUMBER
|
|
251
252
|
```
|
|
252
253
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|