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.
- geobox/__init__.py +61 -63
- geobox/aio/__init__.py +61 -63
- geobox/aio/api.py +489 -473
- geobox/aio/apikey.py +263 -263
- geobox/aio/attachment.py +341 -339
- geobox/aio/base.py +261 -262
- geobox/aio/basemap.py +196 -196
- geobox/aio/dashboard.py +340 -342
- geobox/aio/feature.py +23 -33
- geobox/aio/field.py +315 -321
- geobox/aio/file.py +72 -72
- geobox/aio/layout.py +340 -341
- geobox/aio/log.py +23 -23
- geobox/aio/map.py +1033 -1034
- geobox/aio/model3d.py +415 -415
- geobox/aio/mosaic.py +696 -696
- geobox/aio/plan.py +314 -314
- geobox/aio/query.py +693 -693
- geobox/aio/raster.py +907 -869
- geobox/aio/raster_analysis.py +740 -0
- geobox/aio/route.py +4 -4
- geobox/aio/scene.py +340 -342
- geobox/aio/settings.py +18 -18
- geobox/aio/task.py +404 -402
- geobox/aio/tile3d.py +337 -339
- geobox/aio/tileset.py +102 -103
- geobox/aio/usage.py +52 -51
- geobox/aio/user.py +506 -507
- geobox/aio/vector_tool.py +1968 -0
- geobox/aio/vectorlayer.py +315 -306
- geobox/aio/version.py +272 -273
- geobox/aio/view.py +1019 -983
- geobox/aio/workflow.py +340 -341
- geobox/api.py +18 -2
- geobox/apikey.py +262 -262
- geobox/attachment.py +336 -337
- geobox/base.py +384 -384
- geobox/basemap.py +194 -194
- geobox/dashboard.py +339 -341
- geobox/enums.py +432 -348
- geobox/feature.py +5 -5
- geobox/field.py +320 -320
- geobox/file.py +4 -4
- geobox/layout.py +339 -340
- geobox/log.py +4 -4
- geobox/map.py +1031 -1032
- geobox/model3d.py +410 -410
- geobox/mosaic.py +696 -696
- geobox/plan.py +313 -313
- geobox/query.py +691 -691
- geobox/raster.py +907 -863
- geobox/raster_analysis.py +737 -0
- geobox/scene.py +341 -342
- geobox/settings.py +194 -194
- geobox/task.py +399 -400
- geobox/tile3d.py +337 -338
- geobox/tileset.py +4 -4
- geobox/usage.py +3 -3
- geobox/user.py +503 -503
- geobox/vector_tool.py +1968 -0
- geobox/vectorlayer.py +5 -5
- geobox/version.py +272 -272
- geobox/view.py +981 -981
- geobox/workflow.py +338 -339
- {geobox-2.0.1.dist-info → geobox-2.2.0.dist-info}/METADATA +15 -1
- geobox-2.2.0.dist-info/RECORD +72 -0
- geobox-2.0.1.dist-info/RECORD +0 -68
- {geobox-2.0.1.dist-info → geobox-2.2.0.dist-info}/WHEEL +0 -0
- {geobox-2.0.1.dist-info → geobox-2.2.0.dist-info}/licenses/LICENSE +0 -0
- {geobox-2.0.1.dist-info → geobox-2.2.0.dist-info}/top_level.txt +0 -0
geobox/aio/settings.py
CHANGED
|
@@ -7,17 +7,17 @@ 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
|
|
10
|
+
from ..api import GeoboxClient
|
|
11
|
+
from ..settings import SystemSettings
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
class
|
|
14
|
+
class AsyncSystemSettings(AsyncBase):
|
|
15
15
|
|
|
16
16
|
BASE_ENDPOINT = 'settings/'
|
|
17
17
|
|
|
18
18
|
def __init__(self,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
api: 'AsyncGeoboxClient',
|
|
20
|
+
data: Optional[Dict] = {}):
|
|
21
21
|
"""
|
|
22
22
|
Initialize a System Settings instance.
|
|
23
23
|
|
|
@@ -79,11 +79,11 @@ class SystemSettings(AsyncBase):
|
|
|
79
79
|
Returns:
|
|
80
80
|
str: A string representation of the system setting instance.
|
|
81
81
|
"""
|
|
82
|
-
return "
|
|
82
|
+
return "AsyncSystemSettings()"
|
|
83
83
|
|
|
84
84
|
|
|
85
85
|
@classmethod
|
|
86
|
-
async def get_system_settings(cls, api: 'AsyncGeoboxClient') -> '
|
|
86
|
+
async def get_system_settings(cls, api: 'AsyncGeoboxClient') -> 'AsyncSystemSettings':
|
|
87
87
|
"""
|
|
88
88
|
[async] Get System Settings object (Permission Required).
|
|
89
89
|
|
|
@@ -91,13 +91,13 @@ class SystemSettings(AsyncBase):
|
|
|
91
91
|
api (AsyncGeoboxClient): The AsyncGeoboxClient instance for making requests.
|
|
92
92
|
|
|
93
93
|
Returns:
|
|
94
|
-
|
|
94
|
+
AsyncSystemSetting: the system settings object.
|
|
95
95
|
|
|
96
96
|
Example:
|
|
97
97
|
>>> from geobox.aio import AsyncGeoboxClient
|
|
98
|
-
>>> from geobox.aio.setting import
|
|
98
|
+
>>> from geobox.aio.setting import AsyncSystemSettings
|
|
99
99
|
>>> async with AsyncGeoboxClient() as client:
|
|
100
|
-
>>> setting = await
|
|
100
|
+
>>> setting = await AsyncSystemSettings.get_system_settings(client)
|
|
101
101
|
or
|
|
102
102
|
>>> setting = await client.get_system_settings()
|
|
103
103
|
"""
|
|
@@ -107,7 +107,7 @@ class SystemSettings(AsyncBase):
|
|
|
107
107
|
query_string = urlencode(params)
|
|
108
108
|
endpoint = urljoin(cls.BASE_ENDPOINT, f"?{query_string}")
|
|
109
109
|
response = await api.get(endpoint)
|
|
110
|
-
return
|
|
110
|
+
return AsyncSystemSettings(api, response)
|
|
111
111
|
|
|
112
112
|
|
|
113
113
|
async def update(self, **kwargs) -> Dict:
|
|
@@ -140,9 +140,9 @@ class SystemSettings(AsyncBase):
|
|
|
140
140
|
|
|
141
141
|
Example:
|
|
142
142
|
>>> from geobox.aio import AsyncGeoboxClient
|
|
143
|
-
>>> from geobox.aio.setting import
|
|
143
|
+
>>> from geobox.aio.setting import AsyncSystemSettings
|
|
144
144
|
>>> async with AsyncGeoboxClient() as client:
|
|
145
|
-
>>> settings = await
|
|
145
|
+
>>> settings = await AsyncSystemSetting.get_system_settings(client)
|
|
146
146
|
or
|
|
147
147
|
>>> settings = await client.get_system_settings()
|
|
148
148
|
>>> await settings.update(max_log=100000)
|
|
@@ -168,23 +168,23 @@ class SystemSettings(AsyncBase):
|
|
|
168
168
|
return await super()._update(self.BASE_ENDPOINT, data)
|
|
169
169
|
|
|
170
170
|
|
|
171
|
-
def to_sync(self, sync_client: '
|
|
171
|
+
def to_sync(self, sync_client: 'GeoboxClient') -> 'SystemSettings':
|
|
172
172
|
"""
|
|
173
173
|
Switch to sync version of the system settings instance to have access to the sync methods
|
|
174
174
|
|
|
175
175
|
Args:
|
|
176
|
-
sync_client (
|
|
176
|
+
sync_client (GeoboxClient): The sync version of the GeoboxClient instance for making requests.
|
|
177
177
|
|
|
178
178
|
Returns:
|
|
179
|
-
|
|
179
|
+
SystemSettings: the sync instance of the system settings.
|
|
180
180
|
|
|
181
181
|
Example:
|
|
182
182
|
>>> from geobox import Geoboxclient
|
|
183
183
|
>>> from geobox.aio import AsyncGeoboxClient
|
|
184
|
-
>>> from geobox.aio.setting import
|
|
184
|
+
>>> from geobox.aio.setting import AsyncSystemSettings
|
|
185
185
|
>>> client = GeoboxClient()
|
|
186
186
|
>>> async with AsyncGeoboxClient() as async_client:
|
|
187
|
-
>>> settings = await
|
|
187
|
+
>>> settings = await AsyncSystemSetting.get_system_settings(async_client)
|
|
188
188
|
or
|
|
189
189
|
>>> settings = await async_client.get_system_settings()
|
|
190
190
|
>>> sync_settings = settings.to_sync(client)
|