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/aio/layout.py CHANGED
@@ -5,8 +5,6 @@ from .base import AsyncBase
5
5
  if TYPE_CHECKING:
6
6
  from . import AsyncGeoboxClient
7
7
  from .user import AsyncUser
8
- from ..api import GeoboxClient
9
- from ..layout import Layout
10
8
 
11
9
 
12
10
  class AsyncLayout(AsyncBase):
@@ -314,27 +312,3 @@ class AsyncLayout(AsyncBase):
314
312
  'limit': limit
315
313
  }
316
314
  return await super()._get_shared_users(self.endpoint, params)
317
-
318
-
319
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Layout':
320
- """
321
- Switch to sync version of the layout instance to have access to the sync methods
322
-
323
- Args:
324
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
325
-
326
- Returns:
327
- Layout: the sync instance of the layout.
328
-
329
- Example:
330
- >>> from geobox import Geoboxclient
331
- >>> from geobox.aio import AsyncGeoboxClient
332
- >>> from geobox.aio.layout import AsyncLayout
333
- >>> client = GeoboxClient()
334
- >>> async with AsyncGeoboxClient() as async_client:
335
- >>> layout = await AsyncLayout.get_layout(async_client, uuid="12345678-1234-5678-1234-567812345678")
336
- >>> sync_layout = layout.to_sync(client)
337
- """
338
- from ..layout import Layout
339
-
340
- return Layout(api=sync_client, uuid=self.uuid, data=self.data)
geobox/aio/log.py CHANGED
@@ -5,8 +5,6 @@ from .base import AsyncBase
5
5
  if TYPE_CHECKING:
6
6
  from . import AsyncGeoboxClient
7
7
  from .user import AsyncUser
8
- from ..api import GeoboxClient
9
- from ..log import Log
10
8
 
11
9
 
12
10
  class AsyncLog(AsyncBase):
@@ -118,28 +116,3 @@ class AsyncLog(AsyncBase):
118
116
  >>> await log.user
119
117
  """
120
118
  return await self.api.get_user(self.owner_id)
121
-
122
-
123
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Log':
124
- """
125
- Switch to sync version of the log instance to have access to the sync methods
126
-
127
- Args:
128
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
129
-
130
- Returns:
131
- Log: the sync instance of the log.
132
-
133
- Example:
134
- >>> from geobox import Geoboxclient
135
- >>> from geobox.aio import AsyncGeoboxClient
136
- >>> from geopox.aio.log import AsyncLog
137
- >>> client = GeoboxClient()
138
- >>> async with AsyncGeoboxClient() as async_client:
139
- >>> logs = await AsyncLog.get_logs(async_client)
140
- >>> log = logs[0]
141
- >>> sync_log = log.to_sync(client)
142
- """
143
- from ..log import Log
144
-
145
- return Log(api=sync_client, log_id=self.log_id, data=self.data)
geobox/aio/map.py CHANGED
@@ -12,8 +12,6 @@ if TYPE_CHECKING:
12
12
  from .user import AsyncUser
13
13
  from .task import AsyncTask
14
14
  from .attachment import AsyncAttachment
15
- from ..api import GeoboxClient
16
- from ..map import Map
17
15
 
18
16
 
19
17
  class AsyncMap(AsyncBase):
@@ -1007,27 +1005,3 @@ class AsyncMap(AsyncBase):
1007
1005
  feature=feature,
1008
1006
  display_name=display_name,
1009
1007
  description=description)
1010
-
1011
-
1012
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Map':
1013
- """
1014
- Switch to sync version of the map instance to have access to the sync methods
1015
-
1016
- Args:
1017
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
1018
-
1019
- Returns:
1020
- Map: the sync instance of the map.
1021
-
1022
- Example:
1023
- >>> from geobox import Geoboxclient
1024
- >>> from geobox.aio import AsyncGeoboxClient
1025
- >>> from geobox.aio.map import AsyncMap
1026
- >>> client = GeoboxClient()
1027
- >>> async with AsyncGeoboxClient() as async_client:
1028
- >>> map = await AsyncMap.get_map(async_client, uuid="12345678-1234-5678-1234-567812345678")
1029
- >>> sync_map = map.to_sync(client)
1030
- """
1031
- from ..map import Map
1032
-
1033
- return Map(api=sync_client, uuid=self.uuid, data=self.data)
geobox/aio/model3d.py CHANGED
@@ -11,8 +11,6 @@ from ..utils import get_save_path
11
11
  if TYPE_CHECKING:
12
12
  from . import AsyncGeoboxClient
13
13
  from .user import AsyncUser
14
- from ..api import GeoboxClient
15
- from ..model3d import Model
16
14
 
17
15
 
18
16
  class AsyncModel(AsyncBase):
@@ -389,27 +387,3 @@ class AsyncModel(AsyncBase):
389
387
  'limit': limit
390
388
  }
391
389
  return await super()._get_shared_users(self.endpoint, params)
392
-
393
-
394
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Model':
395
- """
396
- Switch to sync version of the 3d model instance to have access to the sync methods
397
-
398
- Args:
399
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
400
-
401
- Returns:
402
- Model: the sync instance of the 3d model.
403
-
404
- Example:
405
- >>> from geobox import Geoboxclient
406
- >>> from geobox.aio import AsyncGeoboxClient
407
- >>> from geobox.aio.model3d import AsyncModel
408
- >>> client = GeoboxClient()
409
- >>> async with AsyncGeoboxClient() as async_client:
410
- >>> model = await AsyncModel.get_model(async_client, uuid="12345678-1234-5678-1234-567812345678")
411
- >>> sync_model = model.to_sync(client)
412
- """
413
- from ..model3d import Model
414
-
415
- return Model(api=sync_client, uuid=self.uuid, data=self.data)
geobox/aio/mosaic.py CHANGED
@@ -8,8 +8,6 @@ if TYPE_CHECKING:
8
8
  from . import AsyncGeoboxClient
9
9
  from .user import AsyncUser
10
10
  from .task import AsyncTask
11
- from ..api import GeoboxClient
12
- from ..mosaic import Mosaic
13
11
 
14
12
 
15
13
  class AsyncMosaic(AsyncRaster):
@@ -670,27 +668,3 @@ class AsyncMosaic(AsyncRaster):
670
668
  >>> await mosaic.cache_size
671
669
  """
672
670
  return await super().cache_size
673
-
674
-
675
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Mosaic':
676
- """
677
- Switch to sync version of the mosaic instance to have access to the sync methods
678
-
679
- Args:
680
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
681
-
682
- Returns:
683
- Mosiac: the sync instance of the mosaic.
684
-
685
- Example:
686
- >>> from geobox import Geoboxclient
687
- >>> from geobox.aio import AsyncGeoboxClient
688
- >>> from geobox.aio.mosaic import AsyncMosaic
689
- >>> client = GeoboxClient()
690
- >>> async with AsyncGeoboxClient() as async_client:
691
- >>> mosaic = await AsyncMosaic.get_mosaic(async_client, uuid="12345678-1234-5678-1234-567812345678")
692
- >>> sync_mosaic = mosaic.to_sync(client)
693
- """
694
- from ..mosaic import Mosaic
695
-
696
- return Mosaic(api=sync_client, uuid=self.uuid, data=self.data)
geobox/aio/plan.py CHANGED
@@ -5,8 +5,6 @@ from .base import AsyncBase
5
5
 
6
6
  if TYPE_CHECKING:
7
7
  from . import AsyncGeoboxClient
8
- from ..api import GeoboxClient
9
- from ..plan import Plan
10
8
 
11
9
 
12
10
  class AsyncPlan(AsyncBase):
@@ -289,27 +287,3 @@ class AsyncPlan(AsyncBase):
289
287
  """
290
288
  await super()._delete(self.endpoint)
291
289
  self.plan_id = None
292
-
293
-
294
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Plan':
295
- """
296
- Switch to sync version of the plan instance to have access to the sync methods
297
-
298
- Args:
299
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
300
-
301
- Returns:
302
- Plan: the sync instance of the plan.
303
-
304
- Example:
305
- >>> from geobox import Geoboxclient
306
- >>> from geobox.aio import AsyncGeoboxClient
307
- >>> from geobox.aio.plan import AsyncPlan
308
- >>> client = GeoboxClient()
309
- >>> async with AsyncGeoboxClient() as async_client:
310
- >>> plan = await AsyncPlan.get_plan(async_client, plan_id=1)
311
- >>> sync_plan = plan.to_sync(client)
312
- """
313
- from ..plan import Plan as SyncPlan
314
-
315
- return SyncPlan(api=sync_client, plan_id=self.plan_id, data=self.data)
geobox/aio/query.py CHANGED
@@ -9,8 +9,6 @@ from ..enums import QueryResultType, QueryGeometryType, QueryParamType
9
9
  if TYPE_CHECKING:
10
10
  from . import AsyncGeoboxClient
11
11
  from .user import AsyncUser
12
- from ..api import GeoboxClient
13
- from ..query import Query
14
12
 
15
13
 
16
14
  class AsyncQuery(AsyncBase):
@@ -667,27 +665,3 @@ class AsyncQuery(AsyncBase):
667
665
  response = await self.api.post(endpoint, data)
668
666
  task = await AsyncTask.get_task(self.api, response.get('task_id'))
669
667
  return task
670
-
671
-
672
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Query':
673
- """
674
- Switch to sync version of the query instance to have access to the sync methods
675
-
676
- Args:
677
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
678
-
679
- Returns:
680
- Query: the sync instance of the query.
681
-
682
- Example:
683
- >>> from geobox import Geoboxclient
684
- >>> from geobox.aio import AsyncGeoboxClient
685
- >>> from geobox.aio.query import AsyncQuery
686
- >>> client = GeoboxClient()
687
- >>> async with AsyncGeoboxClient() as async_client:
688
- >>> query = await AsyncQuery.get_query(async_client, uuid="12345678-1234-5678-1234-567812345678")
689
- >>> sync_query = query.to_sync(client)
690
- """
691
- from ..query import Query
692
-
693
- return Query(api=sync_client, uuid=self.uuid, data=self.data)
geobox/aio/raster.py CHANGED
@@ -12,8 +12,6 @@ from ..utils import clean_data, join_url_params
12
12
  if TYPE_CHECKING:
13
13
  from . import AsyncGeoboxClient
14
14
  from .user import AsyncUser
15
- from ..api import GeoboxClient
16
- from ..raster import Raster
17
15
 
18
16
 
19
17
  class AsyncRaster(AsyncBase):
@@ -844,30 +842,6 @@ class AsyncRaster(AsyncBase):
844
842
  return await super()._cache_size(self.endpoint)
845
843
 
846
844
 
847
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Raster':
848
- """
849
- Switch to sync version of the raster instance to have access to the sync methods
850
-
851
- Args:
852
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
853
-
854
- Returns:
855
- Raster: the sync instance of the raster.
856
-
857
- Example:
858
- >>> from geobox import Geoboxclient
859
- >>> from geobox.aio import AsyncGeoboxClient
860
- >>> from geobox.aio.raster import AsyncRaster
861
- >>> client = GeoboxClient()
862
- >>> async with AsyncGeoboxClient() as async_client:
863
- >>> raster = await AsyncRaster.get_raster(async_client, uuid="12345678-1234-5678-1234-567812345678")
864
- >>> sync_raster = raster.to_sync(client)
865
- """
866
- from ..raster import Raster
867
-
868
- return Raster(api=sync_client, uuid=self.uuid, data=self.data)
869
-
870
-
871
845
  async def profile(self,
872
846
  polyline: List,
873
847
  number_of_samples: int = 100,
geobox/aio/scene.py CHANGED
@@ -5,8 +5,7 @@ from .base import AsyncBase
5
5
  if TYPE_CHECKING:
6
6
  from . import AsyncGeoboxClient
7
7
  from .user import AsyncUser
8
- from ..api import GeoboxClient
9
- from ..scene import Scene
8
+
10
9
 
11
10
  class AsyncScene(AsyncBase):
12
11
 
@@ -314,27 +313,3 @@ class AsyncScene(AsyncBase):
314
313
  'limit': limit
315
314
  }
316
315
  return await super()._get_shared_users(self.endpoint, params)
317
-
318
-
319
- def to_sync(self, sync_client: 'GeoboxClient') -> 'Scene':
320
- """
321
- Switch to sync version of the scene instance to have access to the sync methods
322
-
323
- Args:
324
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
325
-
326
- Returns:
327
- Scene: the sync instance of the scene.
328
-
329
- Example:
330
- >>> from geobox import Geoboxclient
331
- >>> from geobox.aio import AsyncGeoboxClient
332
- >>> from geobox.aio.scene import AsyncScene
333
- >>> client = GeoboxClient()
334
- >>> async with AsyncGeoboxClient() as async_client:
335
- >>> scene = await AsyncScene.get_scene(async_client, uuid="12345678-1234-5678-1234-567812345678")
336
- >>> sync_scene = scene.to_sync(client)
337
- """
338
- from ..scene import Scene
339
-
340
- return Scene(api=sync_client, uuid=self.uuid, data=self.data)
geobox/aio/settings.py CHANGED
@@ -7,8 +7,6 @@ from ..enums import MaxLogPolicy, InvalidDataPolicy, LoginFailurePolicy, MaxConc
7
7
 
8
8
  if TYPE_CHECKING:
9
9
  from . import AsyncGeoboxClient
10
- from ..api import GeoboxClient
11
- from ..settings import SystemSettings
12
10
 
13
11
 
14
12
  class AsyncSystemSettings(AsyncBase):
@@ -166,29 +164,3 @@ class AsyncSystemSettings(AsyncBase):
166
164
 
167
165
  }
168
166
  return await super()._update(self.BASE_ENDPOINT, data)
169
-
170
-
171
- def to_sync(self, sync_client: 'GeoboxClient') -> 'SystemSettings':
172
- """
173
- Switch to sync version of the system settings instance to have access to the sync methods
174
-
175
- Args:
176
- sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
177
-
178
- Returns:
179
- SystemSettings: the sync instance of the system settings.
180
-
181
- Example:
182
- >>> from geobox import Geoboxclient
183
- >>> from geobox.aio import AsyncGeoboxClient
184
- >>> from geobox.aio.setting import AsyncSystemSettings
185
- >>> client = GeoboxClient()
186
- >>> async with AsyncGeoboxClient() as async_client:
187
- >>> settings = await AsyncSystemSetting.get_system_settings(async_client)
188
- or
189
- >>> settings = await async_client.get_system_settings()
190
- >>> sync_settings = settings.to_sync(client)
191
- """
192
- from ..task import Task as SyncTask
193
-
194
- return SyncTask(api=sync_client, uuid=self.uuid, data=self.data)