geobox 2.1.0__py3-none-any.whl → 2.2.1__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 (70) hide show
  1. geobox/__init__.py +61 -63
  2. geobox/aio/__init__.py +61 -63
  3. geobox/aio/api.py +491 -574
  4. geobox/aio/apikey.py +263 -263
  5. geobox/aio/attachment.py +341 -339
  6. geobox/aio/base.py +261 -262
  7. geobox/aio/basemap.py +196 -196
  8. geobox/aio/dashboard.py +340 -342
  9. geobox/aio/feature.py +35 -35
  10. geobox/aio/field.py +315 -321
  11. geobox/aio/file.py +72 -72
  12. geobox/aio/layout.py +340 -341
  13. geobox/aio/log.py +23 -23
  14. geobox/aio/map.py +1033 -1034
  15. geobox/aio/model3d.py +415 -415
  16. geobox/aio/mosaic.py +696 -696
  17. geobox/aio/plan.py +314 -314
  18. geobox/aio/query.py +693 -693
  19. geobox/aio/raster.py +88 -454
  20. geobox/aio/{analysis.py → raster_analysis.py} +153 -170
  21. geobox/aio/route.py +4 -4
  22. geobox/aio/scene.py +340 -342
  23. geobox/aio/settings.py +18 -18
  24. geobox/aio/task.py +404 -402
  25. geobox/aio/tile3d.py +337 -339
  26. geobox/aio/tileset.py +102 -103
  27. geobox/aio/usage.py +52 -51
  28. geobox/aio/user.py +506 -507
  29. geobox/aio/vector_tool.py +1968 -0
  30. geobox/aio/vectorlayer.py +316 -414
  31. geobox/aio/version.py +272 -273
  32. geobox/aio/view.py +1019 -983
  33. geobox/aio/workflow.py +340 -341
  34. geobox/api.py +14 -98
  35. geobox/apikey.py +262 -262
  36. geobox/attachment.py +336 -337
  37. geobox/base.py +384 -384
  38. geobox/basemap.py +194 -194
  39. geobox/dashboard.py +339 -341
  40. geobox/enums.py +31 -1
  41. geobox/feature.py +31 -10
  42. geobox/field.py +320 -320
  43. geobox/file.py +4 -4
  44. geobox/layout.py +339 -340
  45. geobox/log.py +4 -4
  46. geobox/map.py +1031 -1032
  47. geobox/model3d.py +410 -410
  48. geobox/mosaic.py +696 -696
  49. geobox/plan.py +313 -313
  50. geobox/query.py +691 -691
  51. geobox/raster.py +5 -368
  52. geobox/{analysis.py → raster_analysis.py} +108 -128
  53. geobox/scene.py +341 -342
  54. geobox/settings.py +194 -194
  55. geobox/task.py +399 -400
  56. geobox/tile3d.py +337 -338
  57. geobox/tileset.py +4 -4
  58. geobox/usage.py +3 -3
  59. geobox/user.py +503 -503
  60. geobox/vector_tool.py +1968 -0
  61. geobox/vectorlayer.py +5 -110
  62. geobox/version.py +272 -272
  63. geobox/view.py +981 -981
  64. geobox/workflow.py +338 -339
  65. {geobox-2.1.0.dist-info → geobox-2.2.1.dist-info}/METADATA +15 -1
  66. geobox-2.2.1.dist-info/RECORD +72 -0
  67. geobox-2.1.0.dist-info/RECORD +0 -70
  68. {geobox-2.1.0.dist-info → geobox-2.2.1.dist-info}/WHEEL +0 -0
  69. {geobox-2.1.0.dist-info → geobox-2.2.1.dist-info}/licenses/LICENSE +0 -0
  70. {geobox-2.1.0.dist-info → geobox-2.2.1.dist-info}/top_level.txt +0 -0
geobox/aio/log.py CHANGED
@@ -4,12 +4,12 @@ from .base import AsyncBase
4
4
 
5
5
  if TYPE_CHECKING:
6
6
  from . import AsyncGeoboxClient
7
- from .user import User
8
- from ..api import GeoboxClient as SyncGeoboxClient
9
- from ..log import Log as SyncLog
7
+ from .user import AsyncUser
8
+ from ..api import GeoboxClient
9
+ from ..log import Log
10
10
 
11
11
 
12
- class Log(AsyncBase):
12
+ class AsyncLog(AsyncBase):
13
13
 
14
14
  BASE_ENDPOINT = 'logs/'
15
15
 
@@ -37,11 +37,11 @@ class Log(AsyncBase):
37
37
  Returns:
38
38
  str: A string representation of the Log object.
39
39
  """
40
- return f"Log(id={self.log_id}, activity_type={self.activity_type})"
40
+ return f"AsyncLog(id={self.log_id}, activity_type={self.activity_type})"
41
41
 
42
42
 
43
43
  @classmethod
44
- async def get_logs(cls, api: 'AsyncGeoboxClient', **kwargs) -> List['Log']:
44
+ async def get_logs(cls, api: 'AsyncGeoboxClient', **kwargs) -> List['AsyncLog']:
45
45
  """
46
46
  [async] Get a list of Logs
47
47
 
@@ -60,13 +60,13 @@ class Log(AsyncBase):
60
60
  activity_type (str): the user activity type.
61
61
 
62
62
  Returns:
63
- List[Log]: a list of logs
63
+ List[AsyncLog]: a list of logs
64
64
 
65
65
  Example:
66
66
  >>> from geobox.aio import AsyncGeoboxClient
67
- >>> from geopox.aio.log import Log
67
+ >>> from geopox.aio.log import AsyncLog
68
68
  >>> async with AsyncGeoboxClient() as client:
69
- >>> logs = await Log.get_logs(client)
69
+ >>> logs = await AsyncLog.get_logs(client)
70
70
  or
71
71
  >>> logs = await client.get_logs()
72
72
  """
@@ -81,7 +81,7 @@ class Log(AsyncBase):
81
81
  'user_identity': kwargs.get('user_identity'),
82
82
  'activity_type': kwargs.get('activity_type')
83
83
  }
84
- return await super()._get_list(api, cls.BASE_ENDPOINT, params, factory_func=lambda api, item: Log(api, item['id'], item))
84
+ return await super()._get_list(api, cls.BASE_ENDPOINT, params, factory_func=lambda api, item: AsyncLog(api, item['id'], item))
85
85
 
86
86
 
87
87
  async def delete(self) -> None:
@@ -93,17 +93,17 @@ class Log(AsyncBase):
93
93
 
94
94
  Example:
95
95
  >>> from geobox.aio import AsyncGeoboxClient
96
- >>> from geopox.aio.log import Log
96
+ >>> from geopox.aio.log import AsyncLog
97
97
  >>> async with AsyncGeoboxClient() as client:
98
- >>> log = await Log.get_logs(client)[0]
98
+ >>> log = await AsyncLog.get_logs(client)[0]
99
99
  >>> await log.delete()
100
100
  """
101
- await super().delete(self.endpoint)
101
+ await super()._delete(self.endpoint)
102
102
  self.log_id = None
103
103
 
104
104
 
105
105
  @property
106
- async def user(self) -> Union['User', None]:
106
+ async def user(self) -> Union['AsyncUser', None]:
107
107
  """
108
108
  [async] Get the owner user for the log
109
109
 
@@ -112,34 +112,34 @@ class Log(AsyncBase):
112
112
 
113
113
  Example:
114
114
  >>> from geobox.aio import AsyncGeoboxClient
115
- >>> from geopox.aio.log import Log
115
+ >>> from geopox.aio.log import AsyncLog
116
116
  >>> async with AsyncGeoboxClient() as client:
117
- >>> log = await Log.get_logs(client)[0]
117
+ >>> log = await AsyncLog.get_logs(client)[0]
118
118
  >>> await log.user
119
119
  """
120
120
  return await self.api.get_user(self.owner_id)
121
121
 
122
122
 
123
- def to_sync(self, sync_client: 'SyncGeoboxClient') -> 'SyncLog':
123
+ def to_sync(self, sync_client: 'GeoboxClient') -> 'Log':
124
124
  """
125
125
  Switch to sync version of the log instance to have access to the sync methods
126
126
 
127
127
  Args:
128
- sync_client (SyncGeoboxClient): The sync version of the GeoboxClient instance for making requests.
128
+ sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
129
129
 
130
130
  Returns:
131
- geobox.log.Log: the sync instance of the log.
131
+ Log: the sync instance of the log.
132
132
 
133
133
  Example:
134
134
  >>> from geobox import Geoboxclient
135
135
  >>> from geobox.aio import AsyncGeoboxClient
136
- >>> from geopox.aio.log import Log
136
+ >>> from geopox.aio.log import AsyncLog
137
137
  >>> client = GeoboxClient()
138
138
  >>> async with AsyncGeoboxClient() as async_client:
139
- >>> logs = await Log.get_logs(async_client)
139
+ >>> logs = await AsyncLog.get_logs(async_client)
140
140
  >>> log = logs[0]
141
141
  >>> sync_log = log.to_sync(client)
142
142
  """
143
- from ..log import Log as SyncLog
143
+ from ..log import Log
144
144
 
145
- return SyncLog(api=sync_client, log_id=self.log_id, data=self.data)
145
+ return Log(api=sync_client, log_id=self.log_id, data=self.data)