the-datagarden 1.2.3__tar.gz → 1.2.5__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/PKG-INFO +3 -3
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/pyproject.toml +2 -2
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/authentication/settings.py +2 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/base/__init__.py +11 -1
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/models/regional_data.py +1 -1
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden.egg-info/PKG-INFO +3 -3
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/README.rst +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/setup.cfg +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/abc/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/abc/api.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/abc/authentication.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/authentication/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/authentication/credentials/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/authentication/environment/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/regions/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/regions/base/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/regions/base/settings.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/regions/continent.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/regions/country.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/cli.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/models/__init__.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/models/geojson.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/version.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden.egg-info/SOURCES.txt +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden.egg-info/dependency_links.txt +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden.egg-info/entry_points.txt +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden.egg-info/requires.txt +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden.egg-info/top_level.txt +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/tests/test_cli.py +0 -0
- {the_datagarden-1.2.3 → the_datagarden-1.2.5}/tests/test_the_datagarden_imports.py +0 -0
@@ -1,13 +1,13 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: the-datagarden
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.5
|
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
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "the-datagarden"
|
3
|
-
version = "1.2.
|
3
|
+
version = "1.2.5"
|
4
4
|
description = "Public data made easy."
|
5
5
|
readme = "README.rst"
|
6
6
|
requires-python = ">=3.10"
|
@@ -57,7 +57,7 @@ the-datagarden = "the_datagarden.cli:main"
|
|
57
57
|
"Read the Docs" = "https://dg-the-datagarden.readthedocs.io/en/stable/"
|
58
58
|
"The-DataGarden" = "https://www.the-datagarden.io/"
|
59
59
|
"API documentation" = "https://www.the-datagarden.io/api-docs"
|
60
|
-
"Source" = "https://github.com/
|
60
|
+
"Source" = "https://github.com/OlivettaDataGarden/dg-the-datagarden"
|
61
61
|
|
62
62
|
|
63
63
|
[tool.ruff]
|
@@ -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
|
@@ -404,7 +404,7 @@ class TheDataGardenRegionalDataModel:
|
|
404
404
|
|
405
405
|
for column, stats in stats_by_column.items():
|
406
406
|
print(
|
407
|
-
f"{column} : {
|
407
|
+
f"{column} : {' ' * (max_column_length + 3 - len(column))}"
|
408
408
|
f"{int(stats['count'] + stats['null_count'])}"
|
409
409
|
f" of which with data: {int(stats['count'])} "
|
410
410
|
f"({int(stats['count']) / (int(stats['count'] + stats['null_count'])) * 100:.0f}%)"
|
@@ -1,13 +1,13 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.2
|
2
2
|
Name: the-datagarden
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.5
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/authentication/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/regions/base/__init__.py
RENAMED
File without changes
|
{the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden/api/regions/base/settings.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{the_datagarden-1.2.3 → the_datagarden-1.2.5}/src/the_datagarden.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|