terrakio-core 0.5.2__tar.gz → 0.5.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.

Files changed (24) hide show
  1. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/PKG-INFO +1 -1
  2. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/pyproject.toml +1 -1
  3. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/__init__.py +1 -1
  4. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/async_client.py +4 -1
  5. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/exceptions.py +6 -0
  6. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/.gitignore +0 -0
  7. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/README.md +0 -0
  8. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/accessors.py +0 -0
  9. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/client.py +0 -0
  10. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/config.py +0 -0
  11. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/convenience_functions/create_dataset_file.py +0 -0
  12. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/convenience_functions/geoquries.py +0 -0
  13. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/convenience_functions/zonal_stats.py +0 -0
  14. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/endpoints/auth.py +0 -0
  15. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/endpoints/dataset_management.py +0 -0
  16. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/endpoints/group_management.py +0 -0
  17. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/endpoints/mass_stats.py +0 -0
  18. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/endpoints/model_management.py +0 -0
  19. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/endpoints/space_management.py +0 -0
  20. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/endpoints/user_management.py +0 -0
  21. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/helper/bounded_taskgroup.py +0 -0
  22. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/helper/decorators.py +0 -0
  23. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/helper/tiles.py +0 -0
  24. {terrakio_core-0.5.2 → terrakio_core-0.5.3}/terrakio_core/sync_client.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: terrakio-core
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: Core package for the terrakio-python-api
5
5
  Requires-Python: >=3.11
6
6
  Requires-Dist: aiofiles>=24.1.0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "terrakio-core"
3
- version = "0.5.2"
3
+ version = "0.5.3"
4
4
  description = "Core package for the terrakio-python-api"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.11"
@@ -8,7 +8,7 @@ Core components for Terrakio API clients.
8
8
  # Suppress ONNX Runtime GPU device discovery warnings - MUST BE FIRST!
9
9
  import os
10
10
  os.environ['ORT_LOGGING_LEVEL'] = '3'
11
- __version__ = "0.5.2"
11
+ __version__ = "0.5.3"
12
12
 
13
13
  from .async_client import AsyncClient
14
14
  from .sync_client import SyncClient as Client
@@ -9,7 +9,7 @@ from geopandas import GeoDataFrame
9
9
  from shapely.geometry.base import BaseGeometry as ShapelyGeometry
10
10
  from shapely.geometry import mapping
11
11
  from .client import BaseClient
12
- from .exceptions import APIError, NetworkError
12
+ from .exceptions import APIError, NetworkError, GeoQueryError
13
13
  from .endpoints.dataset_management import DatasetManagement
14
14
  from .endpoints.user_management import UserManagement
15
15
  from .endpoints.mass_stats import MassStats
@@ -184,6 +184,9 @@ class AsyncClient(BaseClient):
184
184
  }
185
185
  result, status_code = await self._terrakio_request("POST", "geoquery", json=payload)
186
186
 
187
+ if status_code != 200:
188
+ raise GeoQueryError("Something went wrong with the geoquery request. Please try again later.", status_code=status_code)
189
+
187
190
  return result
188
191
 
189
192
  async def zonal_stats(self, *args, **kwargs):
@@ -385,6 +385,12 @@ class CancelCollectionTasksError(Exception):
385
385
 
386
386
  class CancelAllTasksError(Exception):
387
387
  """Exception raised for cancel all tasks errors."""
388
+ def __init__(self, message: str, status_code: int = None):
389
+ super().__init__(message)
390
+ self.status_code = status_code
391
+
392
+ class GeoQueryError(Exception):
393
+ """Exception raised for geo query errors."""
388
394
  def __init__(self, message: str, status_code: int = None):
389
395
  super().__init__(message)
390
396
  self.status_code = status_code
File without changes
File without changes