the-datagarden 1.2.3__py3-none-any.whl → 1.2.4__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- the_datagarden/api/authentication/settings.py +2 -0
- the_datagarden/api/base/__init__.py +11 -1
- {the_datagarden-1.2.3.dist-info → the_datagarden-1.2.4.dist-info}/METADATA +2 -2
- {the_datagarden-1.2.3.dist-info → the_datagarden-1.2.4.dist-info}/RECORD +7 -7
- {the_datagarden-1.2.3.dist-info → the_datagarden-1.2.4.dist-info}/WHEEL +0 -0
- {the_datagarden-1.2.3.dist-info → the_datagarden-1.2.4.dist-info}/entry_points.txt +0 -0
- {the_datagarden-1.2.3.dist-info → the_datagarden-1.2.4.dist-info}/top_level.txt +0 -0
@@ -26,6 +26,7 @@ from the_datagarden.abc.authentication import DatagardenEnvironment
|
|
26
26
|
from the_datagarden.api.authentication import AccessToken
|
27
27
|
from the_datagarden.api.authentication.environment import TheDatagardenProductionEnvironment
|
28
28
|
from the_datagarden.api.authentication.settings import (
|
29
|
+
DEFAULT_HEADER,
|
29
30
|
SHOW_REQ_DETAIL,
|
30
31
|
DynamicEndpointCategories,
|
31
32
|
URLExtension,
|
@@ -49,8 +50,17 @@ class BaseDataGardenAPI(BaseApi):
|
|
49
50
|
password: str | None = None,
|
50
51
|
):
|
51
52
|
self._environment = environment or TheDatagardenProductionEnvironment
|
52
|
-
self._tokens = self.ACCESS_TOKEN(self._environment, email, password)
|
53
53
|
self._base_url = self._environment().the_datagarden_url
|
54
|
+
self._api_status = self._check_pulse()
|
55
|
+
self._tokens = self.ACCESS_TOKEN(self._environment, email, password)
|
56
|
+
|
57
|
+
def _check_pulse(self) -> bool:
|
58
|
+
url = self._generate_url(URLExtension.PULSE)
|
59
|
+
response = requests.request(method="GET", url=url, headers=DEFAULT_HEADER.copy())
|
60
|
+
|
61
|
+
if response.status_code == 200:
|
62
|
+
return True
|
63
|
+
return False
|
54
64
|
|
55
65
|
def _generate_url(self, url_extension: str) -> str:
|
56
66
|
url = self._base_url + url_extension
|
@@ -1,13 +1,13 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: the-datagarden
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.4
|
4
4
|
Summary: Public data made easy.
|
5
5
|
Author-email: Maarten de Ruyter <info@the-datagarden.io>
|
6
6
|
License: MIT
|
7
7
|
Project-URL: Read the Docs, https://dg-the-datagarden.readthedocs.io/en/stable/
|
8
8
|
Project-URL: The-DataGarden, https://www.the-datagarden.io/
|
9
9
|
Project-URL: API documentation, https://www.the-datagarden.io/api-docs
|
10
|
-
Project-URL: Source, https://github.com/
|
10
|
+
Project-URL: Source, https://github.com/OlivettaDataGarden/dg-the-datagarden
|
11
11
|
Classifier: Programming Language :: Python :: 3
|
12
12
|
Classifier: Programming Language :: Python :: 3.10
|
13
13
|
Classifier: Programming Language :: Python :: 3.11
|
@@ -6,10 +6,10 @@ the_datagarden/abc/api.py,sha256=RC3PTjrea9asrUfm9XD-AWIcQnhTUyZsBlc8e8leT08,484
|
|
6
6
|
the_datagarden/abc/authentication.py,sha256=6UJVMAlorMCTjvFMFQLwC_Zx6wyENXQekHHgaLZaouk,1174
|
7
7
|
the_datagarden/api/__init__.py,sha256=tUT1s1J3U5fX6edISvchO-rO0zZ5nJFcG4YUAG0Kwc4,235
|
8
8
|
the_datagarden/api/authentication/__init__.py,sha256=JN20Cpjfes9nFBlDLcojJJyyt_W7_78DoQAdAA9tQW0,3715
|
9
|
-
the_datagarden/api/authentication/settings.py,sha256=
|
9
|
+
the_datagarden/api/authentication/settings.py,sha256=uXu544RPhX7m0EyzTH1ANhEr8JhFFyA0h9ks3uTvGMI,1618
|
10
10
|
the_datagarden/api/authentication/credentials/__init__.py,sha256=OXlnUaZ6w-1VIHmCEDKQ7uMZuzKtroeQT_rCl2M0FB8,4806
|
11
11
|
the_datagarden/api/authentication/environment/__init__.py,sha256=9EWOWvinW6C4UAzrPIAI8CqxAM9GErXbo9sKMu5AcH8,426
|
12
|
-
the_datagarden/api/base/__init__.py,sha256=
|
12
|
+
the_datagarden/api/base/__init__.py,sha256=8RYikWdbcJVT52Fn8dxrqvjyxs79R5ZqG-p3YrhGps8,8498
|
13
13
|
the_datagarden/api/regions/__init__.py,sha256=oO533d7dn6CEUZQWGGIUBZvpxvJXRDtdZgNUt3rXg4E,98
|
14
14
|
the_datagarden/api/regions/continent.py,sha256=iCsjCvG39bV4zS-4Nj4mvszo1jmKPLWofobByV9G1cg,204
|
15
15
|
the_datagarden/api/regions/country.py,sha256=Uibm8KvvLSa6DGuHz20IW-G08DC7ggIEkx-OYkQMICA,194
|
@@ -18,8 +18,8 @@ the_datagarden/api/regions/base/settings.py,sha256=KuUR4r-Iro4ZQpQZjssvRoe7_OJ_L
|
|
18
18
|
the_datagarden/models/__init__.py,sha256=UoBC9iK6VfHuW92PeGUteUWAqB0M3qoHDvNBPiNgfhQ,305
|
19
19
|
the_datagarden/models/geojson.py,sha256=74uvrI7YSGgu8ohAMvohKLu6fUkILDT0nZ9l3O4xpis,6340
|
20
20
|
the_datagarden/models/regional_data.py,sha256=zhk6iRYRlzirgxp1k6J9ftt0mAFqWrTH4M3TPiRfR88,16566
|
21
|
-
the_datagarden-1.2.
|
22
|
-
the_datagarden-1.2.
|
23
|
-
the_datagarden-1.2.
|
24
|
-
the_datagarden-1.2.
|
25
|
-
the_datagarden-1.2.
|
21
|
+
the_datagarden-1.2.4.dist-info/METADATA,sha256=XCYu_lwcOPUahp409Iozk4I0XXwWFdqI4efxigf0ZUE,15336
|
22
|
+
the_datagarden-1.2.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
23
|
+
the_datagarden-1.2.4.dist-info/entry_points.txt,sha256=R40-UiUsDqy6RfBSnkOCj98Ed0bfvseJPpClXxqVVAM,59
|
24
|
+
the_datagarden-1.2.4.dist-info/top_level.txt,sha256=S0Wn3mYX0nrwGIqeqWE5vAc3ASTK13E-F_9eTOQu8hs,15
|
25
|
+
the_datagarden-1.2.4.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|