geobox 1.0__tar.gz → 1.1.0__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.
- {geobox-1.0.0 → geobox-1.1.0}/PKG-INFO +2 -2
- {geobox-1.0.0 → geobox-1.1.0}/README.md +1 -1
- {geobox-1.0.0 → geobox-1.1.0}/geobox/task.py +34 -20
- {geobox-1.0.0 → geobox-1.1.0}/geobox.egg-info/PKG-INFO +2 -2
- {geobox-1.0.0 → geobox-1.1.0}/pyproject.toml +1 -1
- {geobox-1.0.0 → geobox-1.1.0}/LICENSE +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/__init__.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/api.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/apikey.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/attachment.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/base.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/basemap.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/dashboard.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/enums.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/exception.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/feature.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/field.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/file.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/log.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/map.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/model3d.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/mosaic.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/plan.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/query.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/raster.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/route.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/scene.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/settings.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/tile3d.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/tileset.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/usage.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/user.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/utils.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/vectorlayer.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/version.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/view.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox/workflow.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox.egg-info/SOURCES.txt +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox.egg-info/dependency_links.txt +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox.egg-info/requires.txt +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/geobox.egg-info/top_level.txt +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/setup.cfg +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_api.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_apikey.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_attachment.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_basemap.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_dashboard.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_feature.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_field.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_file.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_log.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_map.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_model3d.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_mosaic.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_plan.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_query.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_raster.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_route.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_scene.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_settings.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_task.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_tile3d.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_tileset.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_usage.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_user.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_vectorlayer.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_version.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_view.py +0 -0
- {geobox-1.0.0 → geobox-1.1.0}/tests/test_workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: geobox
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: SDK for Geobox's APIs
|
|
5
5
|
Author-email: Hamid Heydari <heydari.h62@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -29,7 +29,7 @@ Dynamic: license-file
|
|
|
29
29
|
|
|
30
30
|
Geobox® is a cloud-based GIS platform that enables users (local governments, companies and individuals) to easily upload their geo-spatial data, publish them as geo-services, visualize and analyze their geo-content (geo-data or -services) and share them with others. Geobox is a modern, world-class and cloud-ready geo-spatial platform that provides standard, safe, efficient and easy to use GI-Services.
|
|
31
31
|
|
|
32
|
-
Geobox SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically. This comprehensive toolkit empowers applications to leverage advanced geospatial capabilities including data management and analysis.
|
|
32
|
+
Geobox python SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically. This comprehensive toolkit empowers applications to leverage advanced geospatial capabilities including data management and analysis.
|
|
33
33
|
|
|
34
34
|
Installation
|
|
35
35
|
============
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
Geobox® is a cloud-based GIS platform that enables users (local governments, companies and individuals) to easily upload their geo-spatial data, publish them as geo-services, visualize and analyze their geo-content (geo-data or -services) and share them with others. Geobox is a modern, world-class and cloud-ready geo-spatial platform that provides standard, safe, efficient and easy to use GI-Services.
|
|
5
5
|
|
|
6
|
-
Geobox SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically. This comprehensive toolkit empowers applications to leverage advanced geospatial capabilities including data management and analysis.
|
|
6
|
+
Geobox python SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically. This comprehensive toolkit empowers applications to leverage advanced geospatial capabilities including data management and analysis.
|
|
7
7
|
|
|
8
8
|
Installation
|
|
9
9
|
============
|
|
@@ -168,8 +168,31 @@ class Task(Base):
|
|
|
168
168
|
|
|
169
169
|
return int((current / total) * 100)
|
|
170
170
|
|
|
171
|
+
|
|
172
|
+
def _wait(self, timeout: Union[int, None] = None, interval: int = 1, progress_bar: bool = True) -> 'TaskStatus':
|
|
173
|
+
start_time = time.time()
|
|
174
|
+
last_progress = 0
|
|
175
|
+
pbar = self._create_progress_bar() if progress_bar else None
|
|
176
|
+
|
|
177
|
+
try:
|
|
178
|
+
while True:
|
|
179
|
+
self._check_timeout(start_time, timeout)
|
|
180
|
+
status = self.status
|
|
181
|
+
|
|
182
|
+
if self._is_final_state(status):
|
|
183
|
+
self._update_progress_bar(pbar, last_progress, status)
|
|
184
|
+
return TaskStatus(status)
|
|
185
|
+
|
|
186
|
+
if pbar:
|
|
187
|
+
last_progress = self._update_progress_bar(pbar, last_progress)
|
|
188
|
+
|
|
189
|
+
time.sleep(interval)
|
|
190
|
+
finally:
|
|
191
|
+
if pbar:
|
|
192
|
+
pbar.close()
|
|
171
193
|
|
|
172
|
-
|
|
194
|
+
|
|
195
|
+
def wait(self, timeout: Union[int, None] = None, interval: int = 1, progress_bar: bool = True, retry: int = 3) -> 'TaskStatus':
|
|
173
196
|
"""
|
|
174
197
|
Wait for the task to finish.
|
|
175
198
|
|
|
@@ -177,6 +200,7 @@ class Task(Base):
|
|
|
177
200
|
timeout (int, optional): Maximum time to wait in seconds.
|
|
178
201
|
interval (int, optional): Time between status checks in seconds.
|
|
179
202
|
progress_bar (bool, optional): Whether to show a progress bar. default: True
|
|
203
|
+
retry (int, optional): Number of times to retry if waiting for the task fails. default is 3
|
|
180
204
|
|
|
181
205
|
Returns:
|
|
182
206
|
TaskStatus: the status of the task(SUCCESS, FAILURE, ABORTED, PENDING, PROGRESS)
|
|
@@ -191,26 +215,16 @@ class Task(Base):
|
|
|
191
215
|
>>> task = Task.get_task(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
192
216
|
>>> task.wait() # return the status of the task
|
|
193
217
|
"""
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
if self._is_final_state(status):
|
|
204
|
-
self._update_progress_bar(pbar, last_progress, status)
|
|
205
|
-
return TaskStatus(status)
|
|
206
|
-
|
|
207
|
-
if pbar:
|
|
208
|
-
last_progress = self._update_progress_bar(pbar, last_progress)
|
|
209
|
-
|
|
218
|
+
last_exception = None
|
|
219
|
+
|
|
220
|
+
for attempt in range(1, retry + 1):
|
|
221
|
+
try:
|
|
222
|
+
return self._wait(timeout, interval, progress_bar)
|
|
223
|
+
except Exception as e:
|
|
224
|
+
last_exception = e
|
|
225
|
+
print(f"[Retry {attempt}/{retry}] Task wait failed: {e}")
|
|
210
226
|
time.sleep(interval)
|
|
211
|
-
|
|
212
|
-
if pbar:
|
|
213
|
-
pbar.close()
|
|
227
|
+
raise last_exception
|
|
214
228
|
|
|
215
229
|
|
|
216
230
|
def _create_progress_bar(self) -> 'tqdm':
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: geobox
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: SDK for Geobox's APIs
|
|
5
5
|
Author-email: Hamid Heydari <heydari.h62@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -29,7 +29,7 @@ Dynamic: license-file
|
|
|
29
29
|
|
|
30
30
|
Geobox® is a cloud-based GIS platform that enables users (local governments, companies and individuals) to easily upload their geo-spatial data, publish them as geo-services, visualize and analyze their geo-content (geo-data or -services) and share them with others. Geobox is a modern, world-class and cloud-ready geo-spatial platform that provides standard, safe, efficient and easy to use GI-Services.
|
|
31
31
|
|
|
32
|
-
Geobox SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically. This comprehensive toolkit empowers applications to leverage advanced geospatial capabilities including data management and analysis.
|
|
32
|
+
Geobox python SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically. This comprehensive toolkit empowers applications to leverage advanced geospatial capabilities including data management and analysis.
|
|
33
33
|
|
|
34
34
|
Installation
|
|
35
35
|
============
|
|
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
|
|
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
|
|
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
|