terrakio-core 0.3.1__tar.gz → 0.3.3__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.
Potentially problematic release.
This version of terrakio-core might be problematic. Click here for more details.
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/PKG-INFO +2 -1
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/pyproject.toml +2 -1
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/__init__.py +1 -1
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/auth.py +0 -15
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/client.py +489 -170
- terrakio_core-0.3.3/terrakio_core/config.py +123 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/dataset_management.py +62 -10
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/mass_stats.py +81 -73
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core.egg-info/PKG-INFO +2 -1
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core.egg-info/requires.txt +1 -0
- terrakio_core-0.3.1/terrakio_core/config.py +0 -81
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/README.md +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/setup.cfg +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/decorators.py +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/exceptions.py +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/generation/tiles.py +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/group_access_management.py +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/space_management.py +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core/user_management.py +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core.egg-info/SOURCES.txt +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core.egg-info/dependency_links.txt +0 -0
- {terrakio_core-0.3.1 → terrakio_core-0.3.3}/terrakio_core.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: terrakio-core
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Core components for Terrakio API clients
|
|
5
5
|
Author-email: Yupeng Chao <yupeng@haizea.com.au>
|
|
6
6
|
Project-URL: Homepage, https://github.com/HaizeaAnalytics/terrakio-python-api
|
|
@@ -22,6 +22,7 @@ Requires-Dist: xarray>=2023.1.0
|
|
|
22
22
|
Requires-Dist: shapely>=2.0.0
|
|
23
23
|
Requires-Dist: geopandas>=0.13.0
|
|
24
24
|
Requires-Dist: google-cloud-storage>=2.0.0
|
|
25
|
+
Requires-Dist: nest_asyncio
|
|
25
26
|
|
|
26
27
|
# Terrakio Core
|
|
27
28
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "terrakio-core"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.3"
|
|
8
8
|
authors = [
|
|
9
9
|
{name = "Yupeng Chao", email = "yupeng@haizea.com.au"},
|
|
10
10
|
]
|
|
@@ -29,6 +29,7 @@ dependencies = [
|
|
|
29
29
|
"shapely>=2.0.0",
|
|
30
30
|
"geopandas>=0.13.0",
|
|
31
31
|
"google-cloud-storage>=2.0.0",
|
|
32
|
+
"nest_asyncio",
|
|
32
33
|
]
|
|
33
34
|
|
|
34
35
|
[project.urls]
|
|
@@ -127,12 +127,8 @@ class AuthClient:
|
|
|
127
127
|
API key
|
|
128
128
|
|
|
129
129
|
Raises:
|
|
130
|
-
ConfigurationError: If not authenticated
|
|
131
130
|
APIError: If refresh fails
|
|
132
131
|
"""
|
|
133
|
-
if not self.token:
|
|
134
|
-
raise ConfigurationError("Not authenticated. Call login() first.")
|
|
135
|
-
|
|
136
132
|
endpoint = f"{self.base_url}/users/refresh_key"
|
|
137
133
|
|
|
138
134
|
try:
|
|
@@ -167,14 +163,9 @@ class AuthClient:
|
|
|
167
163
|
API key
|
|
168
164
|
|
|
169
165
|
Raises:
|
|
170
|
-
ConfigurationError: If not authenticated
|
|
171
166
|
APIError: If retrieval fails
|
|
172
167
|
"""
|
|
173
|
-
if not self.token:
|
|
174
|
-
raise ConfigurationError("Not authenticated. Call login() first.")
|
|
175
|
-
|
|
176
168
|
endpoint = f"{self.base_url}/users/key"
|
|
177
|
-
|
|
178
169
|
try:
|
|
179
170
|
# Use session with updated headers from login
|
|
180
171
|
response = self.session.get(
|
|
@@ -207,14 +198,9 @@ class AuthClient:
|
|
|
207
198
|
User information data
|
|
208
199
|
|
|
209
200
|
Raises:
|
|
210
|
-
ConfigurationError: If not authenticated
|
|
211
201
|
APIError: If retrieval fails
|
|
212
202
|
"""
|
|
213
|
-
if not self.token:
|
|
214
|
-
raise ConfigurationError("Not authenticated. Call login() first.")
|
|
215
|
-
|
|
216
203
|
endpoint = f"{self.base_url}/users/info"
|
|
217
|
-
|
|
218
204
|
try:
|
|
219
205
|
# Use session with updated headers from login
|
|
220
206
|
response = self.session.get(
|
|
@@ -222,7 +208,6 @@ class AuthClient:
|
|
|
222
208
|
verify=self.verify,
|
|
223
209
|
timeout=self.timeout
|
|
224
210
|
)
|
|
225
|
-
|
|
226
211
|
if not response.ok:
|
|
227
212
|
error_msg = f"Failed to retrieve user info: {response.status_code} {response.reason}"
|
|
228
213
|
try:
|