geobox 2.3.0__py3-none-any.whl → 2.4.0__py3-none-any.whl

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.
Files changed (65) hide show
  1. geobox/aio/api.py +153 -7
  2. geobox/aio/apikey.py +0 -26
  3. geobox/aio/attachment.py +5 -31
  4. geobox/aio/basemap.py +2 -30
  5. geobox/aio/dashboard.py +0 -26
  6. geobox/aio/feature.py +172 -17
  7. geobox/aio/field.py +0 -27
  8. geobox/aio/file.py +0 -26
  9. geobox/aio/layout.py +0 -26
  10. geobox/aio/log.py +0 -27
  11. geobox/aio/map.py +0 -26
  12. geobox/aio/model3d.py +0 -26
  13. geobox/aio/mosaic.py +0 -26
  14. geobox/aio/plan.py +0 -26
  15. geobox/aio/query.py +0 -26
  16. geobox/aio/raster.py +0 -26
  17. geobox/aio/scene.py +1 -26
  18. geobox/aio/settings.py +0 -28
  19. geobox/aio/table.py +644 -55
  20. geobox/aio/task.py +0 -27
  21. geobox/aio/tile3d.py +0 -26
  22. geobox/aio/tileset.py +1 -26
  23. geobox/aio/usage.py +0 -32
  24. geobox/aio/user.py +0 -59
  25. geobox/aio/vector_tool.py +49 -0
  26. geobox/aio/vectorlayer.py +8 -34
  27. geobox/aio/version.py +1 -25
  28. geobox/aio/view.py +5 -35
  29. geobox/aio/workflow.py +0 -26
  30. geobox/api.py +152 -7
  31. geobox/apikey.py +0 -26
  32. geobox/attachment.py +0 -26
  33. geobox/basemap.py +0 -28
  34. geobox/dashboard.py +0 -26
  35. geobox/enums.py +11 -1
  36. geobox/feature.py +170 -15
  37. geobox/field.py +0 -28
  38. geobox/file.py +0 -26
  39. geobox/layout.py +0 -26
  40. geobox/log.py +0 -26
  41. geobox/map.py +0 -26
  42. geobox/model3d.py +0 -26
  43. geobox/mosaic.py +0 -26
  44. geobox/plan.py +1 -26
  45. geobox/query.py +1 -26
  46. geobox/raster.py +1 -31
  47. geobox/scene.py +1 -27
  48. geobox/settings.py +1 -29
  49. geobox/table.py +640 -55
  50. geobox/task.py +2 -29
  51. geobox/tile3d.py +0 -26
  52. geobox/tileset.py +1 -26
  53. geobox/usage.py +2 -33
  54. geobox/user.py +1 -59
  55. geobox/vector_tool.py +49 -0
  56. geobox/vectorlayer.py +9 -36
  57. geobox/version.py +1 -26
  58. geobox/view.py +4 -34
  59. geobox/workflow.py +1 -26
  60. {geobox-2.3.0.dist-info → geobox-2.4.0.dist-info}/METADATA +1 -1
  61. geobox-2.4.0.dist-info/RECORD +74 -0
  62. {geobox-2.3.0.dist-info → geobox-2.4.0.dist-info}/WHEEL +1 -1
  63. geobox-2.3.0.dist-info/RECORD +0 -74
  64. {geobox-2.3.0.dist-info → geobox-2.4.0.dist-info}/licenses/LICENSE +0 -0
  65. {geobox-2.3.0.dist-info → geobox-2.4.0.dist-info}/top_level.txt +0 -0
geobox/log.py CHANGED
@@ -5,8 +5,6 @@ from .base import Base
5
5
  if TYPE_CHECKING:
6
6
  from . import GeoboxClient
7
7
  from .user import User
8
- from .aio import AsyncGeoboxClient
9
- from .aio.log import AsyncLog
10
8
 
11
9
 
12
10
  class Log(Base):
@@ -118,27 +116,3 @@ class Log(Base):
118
116
  >>> log.user
119
117
  """
120
118
  return self.api.get_user(self.owner_id)
121
-
122
-
123
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncLog':
124
- """
125
- Switch to async version of the log instance to have access to the async methods
126
-
127
- Args:
128
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
129
-
130
- Returns:
131
- AsyncLog: the async instance of the log.
132
-
133
- Example:
134
- >>> from geobox import Geoboxclient
135
- >>> from geobox.aio import AsyncGeoboxClient
136
- >>> from geopox.log import Log
137
- >>> client = GeoboxClient()
138
- >>> log = Log.get_logs(client)[0]
139
- >>> async with AsyncGeoboxClient() as async_client:
140
- >>> async_log = log.to_async(async_client)
141
- """
142
- from .aio.log import AsyncLog
143
-
144
- return AsyncLog(api=async_client, log_id=self.log_id, data=self.data)
geobox/map.py CHANGED
@@ -12,8 +12,6 @@ if TYPE_CHECKING:
12
12
  from .user import User
13
13
  from .task import Task
14
14
  from .attachment import Attachment
15
- from .aio import AsyncGeoboxClient
16
- from .aio.map import Map as AsyncMap
17
15
 
18
16
 
19
17
  class Map(Base):
@@ -1006,27 +1004,3 @@ class Map(Base):
1006
1004
  feature=feature,
1007
1005
  display_name=display_name,
1008
1006
  description=description)
1009
-
1010
-
1011
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncMap':
1012
- """
1013
- Switch to async version of the map instance to have access to the async methods
1014
-
1015
- Args:
1016
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
1017
-
1018
- Returns:
1019
- AsyncMap: the async instance of the map.
1020
-
1021
- Example:
1022
- >>> from geobox import Geoboxclient
1023
- >>> from geobox.aio import AsyncGeoboxClient
1024
- >>> from geobox.map import Map
1025
- >>> client = GeoboxClient()
1026
- >>> map = Map.get_map(client, uuid="12345678-1234-5678-1234-567812345678")
1027
- >>> async with AsyncGeoboxClient() as async_client:
1028
- >>> async_map = map.to_async(async_client)
1029
- """
1030
- from .aio.map import AsyncMap
1031
-
1032
- return AsyncMap(api=async_client, uuid=self.uuid, data=self.data)
geobox/model3d.py CHANGED
@@ -11,8 +11,6 @@ from .utils import get_save_path
11
11
  if TYPE_CHECKING:
12
12
  from . import GeoboxClient
13
13
  from .user import User
14
- from .aio import AsyncGeoboxClient
15
- from .aio.model3d import AsyncModel
16
14
 
17
15
 
18
16
  class Model(Base):
@@ -385,27 +383,3 @@ class Model(Base):
385
383
  'limit': limit
386
384
  }
387
385
  return super()._get_shared_users(self.endpoint, params)
388
-
389
-
390
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncModel':
391
- """
392
- Switch to async version of the 3d model instance to have access to the async methods
393
-
394
- Args:
395
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
396
-
397
- Returns:
398
- AsyncModel: the async instance of the 3d model.
399
-
400
- Example:
401
- >>> from geobox import Geoboxclient
402
- >>> from geobox.aio import AsyncGeoboxClient
403
- >>> from geobox.model3d import Model
404
- >>> client = GeoboxClient()
405
- >>> model = Model.get_model(client, uuid="12345678-1234-5678-1234-567812345678")
406
- >>> async with AsyncGeoboxClient() as async_client:
407
- >>> async_model = model.to_async(async_client)
408
- """
409
- from .aio.model3d import AsyncModel
410
-
411
- return AsyncModel(api=async_client, uuid=self.uuid, data=self.data)
geobox/mosaic.py CHANGED
@@ -8,8 +8,6 @@ if TYPE_CHECKING:
8
8
  from . import GeoboxClient
9
9
  from .user import User
10
10
  from .task import Task
11
- from .aio import AsyncGeoboxClient
12
- from .aio.mosaic import AsyncMosaic
13
11
 
14
12
 
15
13
  class Mosaic(Raster):
@@ -670,27 +668,3 @@ class Mosaic(Raster):
670
668
  >>> mosaic.cache_size
671
669
  """
672
670
  return super().cache_size
673
-
674
-
675
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncMosaic':
676
- """
677
- Switch to async version of the mosaic instance to have access to the async methods
678
-
679
- Args:
680
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
681
-
682
- Returns:
683
- AsyncMosaic: the async instance of the mosaic.
684
-
685
- Example:
686
- >>> from geobox import Geoboxclient
687
- >>> from geobox.aio import AsyncGeoboxClient
688
- >>> from geobox.mosaic import Mosaic
689
- >>> client = GeoboxClient()
690
- >>> mosaic = Mosaic.get_mosaic(client, uuid="12345678-1234-5678-1234-567812345678")
691
- >>> async with AsyncGeoboxClient() as async_client:
692
- >>> async_mosaic = mosaic.to_async(async_client)
693
- """
694
- from .aio.mosaic import AsyncMosaic
695
-
696
- return AsyncMosaic(api=async_client, uuid=self.uuid, data=self.data)
geobox/plan.py CHANGED
@@ -5,8 +5,7 @@ from .base import Base
5
5
 
6
6
  if TYPE_CHECKING:
7
7
  from . import GeoboxClient
8
- from .aio import AsyncGeoboxClient
9
- from .aio.plan import AsyncPlan
8
+
10
9
 
11
10
  class Plan(Base):
12
11
 
@@ -288,27 +287,3 @@ class Plan(Base):
288
287
  """
289
288
  super()._delete(self.endpoint)
290
289
  self.plan_id = None
291
-
292
-
293
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncPlan':
294
- """
295
- Switch to async version of the plan instance to have access to the async methods
296
-
297
- Args:
298
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
299
-
300
- Returns:
301
- AsyncPlan: the async instance of the plan.
302
-
303
- Example:
304
- >>> from geobox import Geoboxclient
305
- >>> from geobox.aio import AsyncGeoboxClient
306
- >>> from geobox.plan import Plan
307
- >>> client = GeoboxClient()
308
- >>> plan = Plan.get_plan(client, plan_id=1)
309
- >>> async with AsyncGeoboxClient() as async_client:
310
- >>> async_plan = plan.to_async(async_client)
311
- """
312
- from .aio.plan import AsyncPlan
313
-
314
- return AsyncPlan(api=async_client, plan_id=self.plan_id, data=self.data)
geobox/query.py CHANGED
@@ -9,8 +9,7 @@ from .enums import QueryResultType, QueryGeometryType, QueryParamType
9
9
  if TYPE_CHECKING:
10
10
  from . import GeoboxClient
11
11
  from .user import User
12
- from .aio import AsyncGeoboxClient
13
- from .aio.query import AsyncQuery
12
+
14
13
 
15
14
  class Query(Base):
16
15
 
@@ -666,27 +665,3 @@ class Query(Base):
666
665
  response = self.api.post(endpoint, data)
667
666
  task = Task.get_task(self.api, response.get('task_id'))
668
667
  return task
669
-
670
-
671
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncQuery':
672
- """
673
- Switch to async version of the query instance to have access to the async methods
674
-
675
- Args:
676
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
677
-
678
- Returns:
679
- AsyncQuery: the async instance of the query.
680
-
681
- Example:
682
- >>> from geobox import Geoboxclient
683
- >>> from geobox.aio import AsyncGeoboxClient
684
- >>> from geobox.query import Query
685
- >>> client = GeoboxClient()
686
- >>> query = Query.get_query(client, uuid="12345678-1234-5678-1234-567812345678")
687
- >>> async with AsyncGeoboxClient() as async_client:
688
- >>> async_query = query.to_async(async_client)
689
- """
690
- from .aio.query import AsyncQuery
691
-
692
- return AsyncQuery(api=async_client, uuid=self.uuid, data=self.data)
geobox/raster.py CHANGED
@@ -5,20 +5,14 @@ import mimetypes
5
5
  import requests
6
6
  import sys
7
7
 
8
- from geobox.field import Field
9
-
10
8
  from .base import Base
11
9
  from .utils import clean_data, join_url_params
12
10
  from .task import Task
13
- from .vectorlayer import VectorLayer
14
- from .view import VectorLayerView
15
- from .enums import PolygonizeConnectivity, AnalysisResampleMethod, SlopeUnit, AnalysisAlgorithm, AnalysisDataType, RangeBound, DistanceUnit
16
11
 
17
12
  if TYPE_CHECKING:
18
13
  from . import GeoboxClient
19
14
  from .user import User
20
- from .aio import AsyncGeoboxClient
21
- from .aio.raster import AsyncRaster
15
+
22
16
 
23
17
  class Raster(Base):
24
18
 
@@ -844,30 +838,6 @@ class Raster(Base):
844
838
  return super()._cache_size(self.endpoint)
845
839
 
846
840
 
847
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncRaster':
848
- """
849
- Switch to async version of the raster instance to have access to the async methods
850
-
851
- Args:
852
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
853
-
854
- Returns:
855
- AsyncRaster: the async instance of the raster.
856
-
857
- Example:
858
- >>> from geobox import Geoboxclient
859
- >>> from geobox.aio import AsyncGeoboxClient
860
- >>> from geobox.raster import Raster
861
- >>> client = GeoboxClient()
862
- >>> raster = Raster.get_raster(client, uuid="12345678-1234-5678-1234-567812345678")
863
- >>> async with AsyncGeoboxClient() as async_client:
864
- >>> async_raster = raster.to_async(async_client)
865
- """
866
- from .aio.raster import AsyncRaster
867
-
868
- return AsyncRaster(api=async_client, uuid=self.uuid, data=self.data)
869
-
870
-
871
841
  def profile(self,
872
842
  polyline: List,
873
843
  number_of_samples: int = 100,
geobox/scene.py CHANGED
@@ -1,13 +1,11 @@
1
1
  from typing import List, Dict, Optional, TYPE_CHECKING, Union
2
- from urllib.parse import urljoin
3
2
 
4
3
  from .base import Base
5
4
 
6
5
  if TYPE_CHECKING:
7
6
  from . import GeoboxClient
8
7
  from .user import User
9
- from .aio import AsyncGeoboxClient
10
- from .aio.scene import AsyncScene
8
+
11
9
 
12
10
  class Scene(Base):
13
11
 
@@ -315,27 +313,3 @@ class Scene(Base):
315
313
  'limit': limit
316
314
  }
317
315
  return super()._get_shared_users(self.endpoint, params)
318
-
319
-
320
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncScene':
321
- """
322
- Switch to async version of the scene instance to have access to the async methods
323
-
324
- Args:
325
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
326
-
327
- Returns:
328
- AsyncScene: the async instance of the scene.
329
-
330
- Example:
331
- >>> from geobox import Geoboxclient
332
- >>> from geobox.aio import AsyncGeoboxClient
333
- >>> from geobox.scene import Scene
334
- >>> client = GeoboxClient()
335
- >>> scene = Scene.get_scene(client, uuid="12345678-1234-5678-1234-567812345678")
336
- >>> async with AsyncGeoboxClient() as async_client:
337
- >>> async_scene = scene.to_async(async_client)
338
- """
339
- from .aio.scene import AsyncScene
340
-
341
- return AsyncScene(api=async_client, uuid=self.uuid, data=self.data)
geobox/settings.py CHANGED
@@ -1,4 +1,4 @@
1
- from typing import List, Dict, Optional, TYPE_CHECKING
1
+ from typing import Dict, Optional, TYPE_CHECKING
2
2
  from urllib.parse import urljoin, urlencode
3
3
 
4
4
  from .base import Base
@@ -8,8 +8,6 @@ from .enums import MaxLogPolicy, InvalidDataPolicy, LoginFailurePolicy, MaxConcu
8
8
 
9
9
  if TYPE_CHECKING:
10
10
  from . import GeoboxClient
11
- from .aio import AsyncGeoboxClient
12
- from .aio.settings import AsyncSystemSettings
13
11
 
14
12
 
15
13
  class SystemSettings(Base):
@@ -167,29 +165,3 @@ class SystemSettings(Base):
167
165
 
168
166
  }
169
167
  return super()._update(self.BASE_ENDPOINT, data)
170
-
171
-
172
- def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncSystemSettings':
173
- """
174
- Switch to async version of the system settings instance to have access to the async methods
175
-
176
- Args:
177
- async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
178
-
179
- Returns:
180
- AsyncSystemSettings: the async instance of the system settings.
181
-
182
- Example:
183
- >>> from geobox import Geoboxclient
184
- >>> from geobox.aio import AsyncGeoboxClient
185
- >>> from geobox.setting import SystemSettings
186
- >>> client = GeoboxClient()
187
- >>> settings = SystemSetting.get_system_settings(client)
188
- or
189
- >>> settings = client.get_system_settings()
190
- >>> async with AsyncGeoboxClient() as async_client:
191
- >>> async_settings = settings.to_async(async_client)
192
- """
193
- from .aio.settings import AsyncSystemSettings
194
-
195
- return AsyncSystemSettings(api=async_client, data=self.data)