geobox 2.0.1__py3-none-any.whl → 2.2.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 (70) hide show
  1. geobox/__init__.py +61 -63
  2. geobox/aio/__init__.py +61 -63
  3. geobox/aio/api.py +489 -473
  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 +23 -33
  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 +907 -869
  20. geobox/aio/raster_analysis.py +740 -0
  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 +315 -306
  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 +18 -2
  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 +432 -348
  41. geobox/feature.py +5 -5
  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 +907 -863
  52. geobox/raster_analysis.py +737 -0
  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 -5
  62. geobox/version.py +272 -272
  63. geobox/view.py +981 -981
  64. geobox/workflow.py +338 -339
  65. {geobox-2.0.1.dist-info → geobox-2.2.0.dist-info}/METADATA +15 -1
  66. geobox-2.2.0.dist-info/RECORD +72 -0
  67. geobox-2.0.1.dist-info/RECORD +0 -68
  68. {geobox-2.0.1.dist-info → geobox-2.2.0.dist-info}/WHEEL +0 -0
  69. {geobox-2.0.1.dist-info → geobox-2.2.0.dist-info}/licenses/LICENSE +0 -0
  70. {geobox-2.0.1.dist-info → geobox-2.2.0.dist-info}/top_level.txt +0 -0
geobox/aio/version.py CHANGED
@@ -1,273 +1,272 @@
1
- from typing import TYPE_CHECKING, Dict, List, Optional, Union
2
-
3
- from .base import AsyncBase
4
-
5
- if TYPE_CHECKING:
6
- from .api import AsyncGeoboxClient
7
- from .user import User
8
- from ..api import GeoboxClient as SyncGeoboxClient
9
- from ..version import VectorLayerVersion as SyncVectorLayerVersion
10
-
11
- class VectorLayerVersion(AsyncBase):
12
-
13
- BASE_ENDPOINT = 'vectorLayerVersions/'
14
-
15
- def __init__(self,
16
- api: 'AsyncGeoboxClient',
17
- uuid: str,
18
- data: Optional[Dict] = {}):
19
- """
20
- Initialize a vector layer version instance.
21
-
22
- Args:
23
- api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
24
- uuid (str): The unique identifier for the version.
25
- data (Dict): The data of the version.
26
- """
27
- super().__init__(api, uuid=uuid, data=data)
28
-
29
-
30
- @classmethod
31
- async def get_versions(cls, api: 'AsyncGeoboxClient', **kwargs) -> Union[List['VectorLayerVersion'], int]:
32
- """
33
- [async] Get list of versions with optional filtering and pagination.
34
-
35
- Args:
36
- api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
37
-
38
- Keyword Args:
39
- layer_id (str): the id of the vector layer.
40
- q (str): query filter based on OGC CQL standard. e.g. "field1 LIKE '%GIS%' AND created_at > '2021-01-01'"
41
- search (str): search term for keyword-based searching among search_fields or all textual fields if search_fields does not have value. NOTE: if q param is defined this param will be ignored.
42
- search_fields (str): comma separated list of fields for searching.
43
- order_by (str): comma separated list of fields for sorting results [field1 A|D, field2 A|D, …]. e.g. name A, type D. NOTE: "A" denotes ascending order and "D" denotes descending order.
44
- return_count (bool): Whether to return total count. default is False.
45
- skip (int): Number of items to skip. default is 0.
46
- limit (int): Number of items to return. default is 10.
47
- user_id (int): Specific user. privileges required.
48
- shared (bool): Whether to return shared versions. default is False.
49
-
50
- Returns:
51
- List[VectorLayerVersion] | int: A list of vector layer version instances or the total number of versions.
52
-
53
- Example:
54
- >>> from geobox.aio import AsyncGeoboxClient
55
- >>> from geobox.aio.version import VectorLayerVersion
56
- >>> async with AsyncGeoboxClient() as client:
57
- >>> versions = await VectorLayerVersion.get_versions(client, q="name LIKE '%My version%'")
58
- or
59
- >>> versions = await client.get_versions(q="name LIKE '%My version%'")
60
- """
61
- params = {
62
- 'layer_id': kwargs.get('layer_id'),
63
- 'f': 'json',
64
- 'q': kwargs.get('q'),
65
- 'search': kwargs.get('search'),
66
- 'search_fields': kwargs.get('search_fields'),
67
- 'order_by': kwargs.get('order_by'),
68
- 'return_count': kwargs.get('return_count', False),
69
- 'skip': kwargs.get('skip', 0),
70
- 'limit': kwargs.get('limit', 10),
71
- 'user_id': kwargs.get('user_id'),
72
- 'shared': kwargs.get('shared', False)
73
- }
74
- return await super()._get_list(api, cls.BASE_ENDPOINT, params, factory_func=lambda api, item: VectorLayerVersion(api, item['uuid'], item))
75
-
76
-
77
- @classmethod
78
- async def get_version(cls, api: 'AsyncGeoboxClient', uuid: str, user_id: int = None) -> 'VectorLayerVersion':
79
- """
80
- [async] Get a version by its UUID.
81
-
82
- Args:
83
- api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
84
- uuid (str): The UUID of the version to get.
85
- user_id (int, optional): Specific user. privileges required.
86
-
87
- Returns:
88
- VectorLayerVersion: The vector layer version object.
89
-
90
- Raises:
91
- NotFoundError: If the version with the specified UUID is not found.
92
-
93
- Example:
94
- >>> from geobox.aio import AsyncGeoboxClient
95
- >>> from geobox.aio.version import VectorLayerVersion
96
- >>> async with AsyncGeoboxClient() as client:
97
- >>> version = await VectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
98
- or
99
- >>> version = await client.get_version(uuid="12345678-1234-5678-1234-567812345678")
100
- """
101
- params = {
102
- 'f': 'json',
103
- 'user_id': user_id,
104
- }
105
- return await super()._get_detail(api, cls.BASE_ENDPOINT, uuid, params, factory_func=lambda api, item: VectorLayerVersion(api, item['uuid'], item))
106
-
107
-
108
- @classmethod
109
- async def get_version_by_name(cls, api: 'AsyncGeoboxClient', name: str, user_id: int = None) -> 'VectorLayerVersion':
110
- """
111
- [async] Get a version by name
112
-
113
- Args:
114
- api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
115
- name (str): the name of the version to get
116
- user_id (int, optional): specific user. privileges required.
117
-
118
- Returns:
119
- VectorLayerVersion | None: returns the version if a version matches the given name, else None
120
-
121
- Example:
122
- >>> from geobox.aio import AsyncGeoboxClient
123
- >>> from geobox.aio.version import VectorLayerVersion
124
- >>> async with AsyncGeoboxClient() as client:
125
- >>> version = await VectorLayerView.get_version_by_name(client, name='test')
126
- or
127
- >>> version = await client.get_version_by_name(name='test')
128
- """
129
- versions = await cls.get_versions(api, q=f"name = '{name}'", user_id=user_id)
130
- if versions and versions[0].name == name:
131
- return versions[0]
132
- else:
133
- return None
134
-
135
-
136
- async def update(self, **kwargs) -> Dict:
137
- """
138
- [async] Update the version.
139
-
140
- Args:
141
- name (str): The name of the version.
142
- display_name (str): The display name of the version.
143
- description (str): The description of the version.
144
-
145
- Returns:
146
- Dict: The updated version data.
147
-
148
- Raises:
149
- ValidationError: If the version data is invalid.
150
-
151
- Example:
152
- >>> from geobox.aio import AsyncGeoboxClient
153
- >>> from geobox.aio.version import VectorLayerVersion
154
- >>> async with AsyncGeoboxClient() as client:
155
- >>> version = await VectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
156
- >>> await version.update_version(display_name="New Display Name")
157
- """
158
- data = {
159
- "name": kwargs.get('name'),
160
- "display_name": kwargs.get('display_name'),
161
- "description": kwargs.get('description'),
162
- }
163
- return await super()._update(self.endpoint, data)
164
-
165
-
166
- async def delete(self) -> None:
167
- """
168
- [async] Delete the version.
169
-
170
- Returns:
171
- None
172
-
173
- Example:
174
- >>> from geobox.aio import AsyncGeoboxClient
175
- >>> from geobox.aio.version import VectorLayerVersion
176
- >>> async with AsyncGeoboxClient() as client:
177
- >>> version = await VectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
178
- >>> await version.delete()
179
- """
180
- await super().delete(self.endpoint)
181
-
182
-
183
- async def share(self, users: List['User']) -> None:
184
- """
185
- [async] Shares the version with specified users.
186
-
187
- Args:
188
- users (List[User]): The list of user objects to share the version with.
189
-
190
- Returns:
191
- None
192
-
193
- Example:
194
- >>> from geobox.aio import AsyncGeoboxClient
195
- >>> from geobox.aio.version import VectorLayerVersion
196
- >>> async with AsyncGeoboxClient() as client:
197
- >>> version = await VectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
198
- >>> users = await client.search_users(search='John')
199
- >>> await version.share(users=users)
200
- """
201
- await super()._share(self.endpoint, users)
202
-
203
-
204
- async def unshare(self, users: List['User']) -> None:
205
- """
206
- [async] Unshares the version with specified users.
207
-
208
- Args:
209
- users (List[User]): The list of user objects to unshare the version with.
210
-
211
- Returns:
212
- None
213
-
214
- Example:
215
- >>> from geobox.aio import AsyncGeoboxClient
216
- >>> from geobox.aio.version import VectorLayerVersion
217
- >>> async with AsyncGeoboxClient() as client:
218
- >>> version = await VectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
219
- >>> users = await client.search_users(search='John')
220
- >>> await version.unshare(users=users)
221
- """
222
- await super()._unshare(self.endpoint, users)
223
-
224
-
225
- async def get_shared_users(self, search: str = None, skip: int = 0, limit: int = 10) -> List['User']:
226
- """
227
- [async] Retrieves the list of users the version is shared with.
228
-
229
- Args:
230
- search (str, optional): The search query.
231
- skip (int, optional): The number of users to skip.
232
- limit (int, optional): The maximum number of users to retrieve.
233
-
234
- Returns:
235
- List[User]: The list of shared users.
236
-
237
- Example:
238
- >>> from geobox.aio import AsyncGeoboxClient
239
- >>> from geobox.aio.version import VectorLayerVersion
240
- >>> async with AsyncGeoboxClient() as client:
241
- >>> version = await VectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
242
- >>> await version.get_shared_users(search='John', skip=0, limit=10)
243
- """
244
- params = {
245
- 'search': search,
246
- 'skip': skip,
247
- 'limit': limit
248
- }
249
- return await super()._get_shared_users(self.endpoint, params)
250
-
251
-
252
- def to_sync(self, sync_client: 'SyncGeoboxClient') -> 'SyncVectorLayerVersion':
253
- """
254
- Switch to sync version of the version instance to have access to the sync methods
255
-
256
- Args:
257
- sync_client (SyncGeoboxClient): The sync version of the GeoboxClient instance for making requests.
258
-
259
- Returns:
260
- geobox.version.VectorLayerVersion: the sync instance of the version.
261
-
262
- Example:
263
- >>> from geobox import Geoboxclient
264
- >>> from geobox.aio import AsyncGeoboxClient
265
- >>> from geobox.aio.version import VectorLayerversion
266
- >>> client = GeoboxClient()
267
- >>> async with AsyncGeoboxClient() as async_client:
268
- >>> version = await async_client.get_version(async_client, uuid="12345678-1234-5678-1234-567812345678")
269
- >>> sync_version = version.to_sync(client)
270
- """
271
- from ..version import VectorLayerVersion as SyncVectorLayerVersion
272
-
273
- return SyncVectorLayerVersion(api=sync_client, uuid=self.uuid, data=self.data)
1
+ from typing import TYPE_CHECKING, Dict, List, Optional, Union
2
+
3
+ from .base import AsyncBase
4
+
5
+ if TYPE_CHECKING:
6
+ from .api import AsyncGeoboxClient
7
+ from .user import AsyncUser
8
+ from ..api import GeoboxClient
9
+ from ..version import VectorLayerVersion
10
+
11
+ class AsyncVectorLayerVersion(AsyncBase):
12
+
13
+ BASE_ENDPOINT = 'vectorLayerVersions/'
14
+
15
+ def __init__(self,
16
+ api: 'AsyncGeoboxClient',
17
+ uuid: str,
18
+ data: Optional[Dict] = {}):
19
+ """
20
+ Initialize a vector layer version instance.
21
+
22
+ Args:
23
+ api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
24
+ uuid (str): The unique identifier for the version.
25
+ data (Dict): The data of the version.
26
+ """
27
+ super().__init__(api, uuid=uuid, data=data)
28
+
29
+
30
+ @classmethod
31
+ async def get_versions(cls, api: 'AsyncGeoboxClient', **kwargs) -> Union[List['AsyncVectorLayerVersion'], int]:
32
+ """
33
+ [async] Get list of versions with optional filtering and pagination.
34
+
35
+ Args:
36
+ api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
37
+
38
+ Keyword Args:
39
+ layer_id (str): the id of the vector layer.
40
+ q (str): query filter based on OGC CQL standard. e.g. "field1 LIKE '%GIS%' AND created_at > '2021-01-01'"
41
+ search (str): search term for keyword-based searching among search_fields or all textual fields if search_fields does not have value. NOTE: if q param is defined this param will be ignored.
42
+ search_fields (str): comma separated list of fields for searching.
43
+ order_by (str): comma separated list of fields for sorting results [field1 A|D, field2 A|D, …]. e.g. name A, type D. NOTE: "A" denotes ascending order and "D" denotes descending order.
44
+ return_count (bool): Whether to return total count. default is False.
45
+ skip (int): Number of items to skip. default is 0.
46
+ limit (int): Number of items to return. default is 10.
47
+ user_id (int): Specific user. privileges required.
48
+ shared (bool): Whether to return shared versions. default is False.
49
+
50
+ Returns:
51
+ List[AsyncVectorLayerVersion] | int: A list of vector layer version instances or the total number of versions.
52
+
53
+ Example:
54
+ >>> from geobox.aio import AsyncGeoboxClient
55
+ >>> from geobox.aio.version import AsyncVectorLayerVersion
56
+ >>> async with AsyncGeoboxClient() as client:
57
+ >>> versions = await AsyncVectorLayerVersion.get_versions(client, q="name LIKE '%My version%'")
58
+ or
59
+ >>> versions = await client.get_versions(q="name LIKE '%My version%'")
60
+ """
61
+ params = {
62
+ 'layer_id': kwargs.get('layer_id'),
63
+ 'f': 'json',
64
+ 'q': kwargs.get('q'),
65
+ 'search': kwargs.get('search'),
66
+ 'search_fields': kwargs.get('search_fields'),
67
+ 'order_by': kwargs.get('order_by'),
68
+ 'return_count': kwargs.get('return_count', False),
69
+ 'skip': kwargs.get('skip', 0),
70
+ 'limit': kwargs.get('limit', 10),
71
+ 'user_id': kwargs.get('user_id'),
72
+ 'shared': kwargs.get('shared', False)
73
+ }
74
+ return await super()._get_list(api, cls.BASE_ENDPOINT, params, factory_func=lambda api, item: AsyncVectorLayerVersion(api, item['uuid'], item))
75
+
76
+
77
+ @classmethod
78
+ async def get_version(cls, api: 'AsyncGeoboxClient', uuid: str, user_id: int = None) -> 'AsyncVectorLayerVersion':
79
+ """
80
+ [async] Get a version by its UUID.
81
+
82
+ Args:
83
+ api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
84
+ uuid (str): The UUID of the version to get.
85
+ user_id (int, optional): Specific user. privileges required.
86
+
87
+ Returns:
88
+ AsyncVectorLayerVersion: The vector layer version object.
89
+
90
+ Raises:
91
+ NotFoundError: If the version with the specified UUID is not found.
92
+
93
+ Example:
94
+ >>> from geobox.aio import AsyncGeoboxClient
95
+ >>> from geobox.aio.version import AsyncVectorLayerVersion
96
+ >>> async with AsyncGeoboxClient() as client:
97
+ >>> version = await AsyncVectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
98
+ or
99
+ >>> version = await client.get_version(uuid="12345678-1234-5678-1234-567812345678")
100
+ """
101
+ params = {
102
+ 'f': 'json',
103
+ 'user_id': user_id,
104
+ }
105
+ return await super()._get_detail(api, cls.BASE_ENDPOINT, uuid, params, factory_func=lambda api, item: AsyncVectorLayerVersion(api, item['uuid'], item))
106
+
107
+
108
+ @classmethod
109
+ async def get_version_by_name(cls, api: 'AsyncGeoboxClient', name: str, user_id: int = None) -> 'AsyncVectorLayerVersion':
110
+ """
111
+ [async] Get a version by name
112
+
113
+ Args:
114
+ api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
115
+ name (str): the name of the version to get
116
+ user_id (int, optional): specific user. privileges required.
117
+
118
+ Returns:
119
+ AsyncVectorLayerVersion | None: returns the version if a version matches the given name, else None
120
+
121
+ Example:
122
+ >>> from geobox.aio import AsyncGeoboxClient
123
+ >>> from geobox.aio.version import AsyncVectorLayerVersion
124
+ >>> async with AsyncGeoboxClient() as client:
125
+ >>> version = await VectorLayerView.get_version_by_name(client, name='test')
126
+ or
127
+ >>> version = await client.get_version_by_name(name='test')
128
+ """
129
+ versions = await cls.get_versions(api, q=f"name = '{name}'", user_id=user_id)
130
+ if versions and versions[0].name == name:
131
+ return versions[0]
132
+ else:
133
+ return None
134
+
135
+
136
+ async def update(self, **kwargs) -> Dict:
137
+ """
138
+ [async] Update the version.
139
+
140
+ Args:
141
+ name (str): The name of the version.
142
+ display_name (str): The display name of the version.
143
+ description (str): The description of the version.
144
+
145
+ Returns:
146
+ Dict: The updated version data.
147
+
148
+ Raises:
149
+ ValidationError: If the version data is invalid.
150
+
151
+ Example:
152
+ >>> from geobox.aio import AsyncGeoboxClient
153
+ >>> from geobox.aio.version import AsyncVectorLayerVersion
154
+ >>> async with AsyncGeoboxClient() as client:
155
+ >>> version = await AsyncVectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
156
+ >>> await version.update_version(display_name="New Display Name")
157
+ """
158
+ data = {
159
+ "name": kwargs.get('name'),
160
+ "display_name": kwargs.get('display_name'),
161
+ "description": kwargs.get('description'),
162
+ }
163
+ return await super()._update(self.endpoint, data)
164
+
165
+
166
+ async def delete(self) -> None:
167
+ """
168
+ [async] Delete the version.
169
+
170
+ Returns:
171
+ None
172
+
173
+ Example:
174
+ >>> from geobox.aio import AsyncGeoboxClient
175
+ >>> from geobox.aio.version import AsyncVectorLayerVersion
176
+ >>> async with AsyncGeoboxClient() as client:
177
+ >>> version = await AsyncVectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
178
+ >>> await version.delete()
179
+ """
180
+ await super()._delete(self.endpoint)
181
+
182
+
183
+ async def share(self, users: List['AsyncUser']) -> None:
184
+ """
185
+ [async] Shares the version with specified users.
186
+
187
+ Args:
188
+ users (List[User]): The list of user objects to share the version with.
189
+
190
+ Returns:
191
+ None
192
+
193
+ Example:
194
+ >>> from geobox.aio import AsyncGeoboxClient
195
+ >>> from geobox.aio.version import AsyncVectorLayerVersion
196
+ >>> async with AsyncGeoboxClient() as client:
197
+ >>> version = await AsyncVectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
198
+ >>> users = await client.search_users(search='John')
199
+ >>> await version.share(users=users)
200
+ """
201
+ await super()._share(self.endpoint, users)
202
+
203
+
204
+ async def unshare(self, users: List['AsyncUser']) -> None:
205
+ """
206
+ [async] Unshares the version with specified users.
207
+
208
+ Args:
209
+ users (List[User]): The list of user objects to unshare the version with.
210
+
211
+ Returns:
212
+ None
213
+
214
+ Example:
215
+ >>> from geobox.aio import AsyncGeoboxClient
216
+ >>> from geobox.aio.version import AsyncVectorLayerVersion
217
+ >>> async with AsyncGeoboxClient() as client:
218
+ >>> version = await AsyncVectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
219
+ >>> users = await client.search_users(search='John')
220
+ >>> await version.unshare(users=users)
221
+ """
222
+ await super()._unshare(self.endpoint, users)
223
+
224
+
225
+ async def get_shared_users(self, search: str = None, skip: int = 0, limit: int = 10) -> List['AsyncUser']:
226
+ """
227
+ [async] Retrieves the list of users the version is shared with.
228
+
229
+ Args:
230
+ search (str, optional): The search query.
231
+ skip (int, optional): The number of users to skip.
232
+ limit (int, optional): The maximum number of users to retrieve.
233
+
234
+ Returns:
235
+ List[AsyncUser]: The list of shared users.
236
+
237
+ Example:
238
+ >>> from geobox.aio import AsyncGeoboxClient
239
+ >>> from geobox.aio.version import AsyncVectorLayerVersion
240
+ >>> async with AsyncGeoboxClient() as client:
241
+ >>> version = await AsyncVectorLayerVersion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
242
+ >>> await version.get_shared_users(search='John', skip=0, limit=10)
243
+ """
244
+ params = {
245
+ 'search': search,
246
+ 'skip': skip,
247
+ 'limit': limit
248
+ }
249
+ return await super()._get_shared_users(self.endpoint, params)
250
+
251
+
252
+ def to_sync(self, sync_client: 'GeoboxClient') -> 'VectorLayerVersion':
253
+ """
254
+ Switch to sync version of the version instance to have access to the sync methods
255
+
256
+ Args:
257
+ sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
258
+
259
+ Returns:
260
+ VectorLayerVersion: the sync instance of the version.
261
+
262
+ Example:
263
+ >>> from geobox import Geoboxclient
264
+ >>> from geobox.aio import AsyncGeoboxClient
265
+ >>> client = GeoboxClient()
266
+ >>> async with AsyncGeoboxClient() as async_client:
267
+ >>> version = await async_client.get_version(async_client, uuid="12345678-1234-5678-1234-567812345678")
268
+ >>> sync_version = version.to_sync(client)
269
+ """
270
+ from ..version import VectorLayerVersion
271
+
272
+ return VectorLayerVersion(api=sync_client, uuid=self.uuid, data=self.data)