geobox 2.0.1__tar.gz → 2.2.0__tar.gz
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-2.0.1 → geobox-2.2.0}/PKG-INFO +15 -1
- {geobox-2.0.1 → geobox-2.2.0}/README.md +79 -65
- {geobox-2.0.1 → geobox-2.2.0}/geobox/__init__.py +61 -63
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/__init__.py +61 -63
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/api.py +489 -473
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/apikey.py +263 -263
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/attachment.py +341 -339
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/base.py +261 -262
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/basemap.py +196 -196
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/dashboard.py +340 -342
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/feature.py +23 -33
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/field.py +315 -321
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/file.py +72 -72
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/layout.py +340 -341
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/log.py +23 -23
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/map.py +1033 -1034
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/model3d.py +415 -415
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/mosaic.py +696 -696
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/plan.py +314 -314
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/query.py +693 -693
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/raster.py +907 -869
- geobox-2.2.0/geobox/aio/raster_analysis.py +740 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/route.py +4 -4
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/scene.py +340 -342
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/settings.py +18 -18
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/task.py +404 -402
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/tile3d.py +337 -339
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/tileset.py +102 -103
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/usage.py +52 -51
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/user.py +506 -507
- geobox-2.2.0/geobox/aio/vector_tool.py +1968 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/vectorlayer.py +315 -306
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/version.py +272 -273
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/view.py +1019 -983
- {geobox-2.0.1 → geobox-2.2.0}/geobox/aio/workflow.py +340 -341
- {geobox-2.0.1 → geobox-2.2.0}/geobox/api.py +18 -2
- {geobox-2.0.1 → geobox-2.2.0}/geobox/apikey.py +262 -262
- {geobox-2.0.1 → geobox-2.2.0}/geobox/attachment.py +336 -337
- {geobox-2.0.1 → geobox-2.2.0}/geobox/base.py +384 -384
- {geobox-2.0.1 → geobox-2.2.0}/geobox/basemap.py +194 -194
- {geobox-2.0.1 → geobox-2.2.0}/geobox/dashboard.py +339 -341
- {geobox-2.0.1 → geobox-2.2.0}/geobox/enums.py +432 -348
- {geobox-2.0.1 → geobox-2.2.0}/geobox/feature.py +5 -5
- {geobox-2.0.1 → geobox-2.2.0}/geobox/field.py +320 -320
- {geobox-2.0.1 → geobox-2.2.0}/geobox/file.py +4 -4
- {geobox-2.0.1 → geobox-2.2.0}/geobox/layout.py +339 -340
- {geobox-2.0.1 → geobox-2.2.0}/geobox/log.py +4 -4
- {geobox-2.0.1 → geobox-2.2.0}/geobox/map.py +1031 -1032
- {geobox-2.0.1 → geobox-2.2.0}/geobox/model3d.py +410 -410
- {geobox-2.0.1 → geobox-2.2.0}/geobox/mosaic.py +696 -696
- {geobox-2.0.1 → geobox-2.2.0}/geobox/plan.py +313 -313
- {geobox-2.0.1 → geobox-2.2.0}/geobox/query.py +691 -691
- {geobox-2.0.1 → geobox-2.2.0}/geobox/raster.py +907 -863
- geobox-2.2.0/geobox/raster_analysis.py +737 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox/scene.py +341 -342
- {geobox-2.0.1 → geobox-2.2.0}/geobox/settings.py +194 -194
- {geobox-2.0.1 → geobox-2.2.0}/geobox/task.py +399 -400
- {geobox-2.0.1 → geobox-2.2.0}/geobox/tile3d.py +337 -338
- {geobox-2.0.1 → geobox-2.2.0}/geobox/tileset.py +4 -4
- {geobox-2.0.1 → geobox-2.2.0}/geobox/usage.py +3 -3
- {geobox-2.0.1 → geobox-2.2.0}/geobox/user.py +503 -503
- geobox-2.2.0/geobox/vector_tool.py +1968 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox/vectorlayer.py +5 -5
- {geobox-2.0.1 → geobox-2.2.0}/geobox/version.py +272 -272
- {geobox-2.0.1 → geobox-2.2.0}/geobox/view.py +981 -981
- {geobox-2.0.1 → geobox-2.2.0}/geobox/workflow.py +338 -339
- {geobox-2.0.1 → geobox-2.2.0}/geobox.egg-info/PKG-INFO +15 -1
- {geobox-2.0.1 → geobox-2.2.0}/geobox.egg-info/SOURCES.txt +6 -0
- {geobox-2.0.1 → geobox-2.2.0}/pyproject.toml +1 -1
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_api.py +2049 -2025
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_raster.py +11 -1
- geobox-2.2.0/tests/test_raster_analysis.py +290 -0
- geobox-2.2.0/tests/test_vector_tool.py +1071 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_vectorlayer.py +793 -793
- {geobox-2.0.1 → geobox-2.2.0}/LICENSE +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox/exception.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox/route.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox/utils.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox.egg-info/dependency_links.txt +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox.egg-info/requires.txt +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/geobox.egg-info/top_level.txt +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/setup.cfg +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_apikey.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_attachment.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_basemap.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_dashboard.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_feature.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_field.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_file.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_layout.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_log.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_map.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_model3d.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_mosaic.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_plan.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_query.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_route.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_scene.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_settings.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_task.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_tile3d.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_tileset.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_usage.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_user.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_version.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_view.py +0 -0
- {geobox-2.0.1 → geobox-2.2.0}/tests/test_workflow.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: geobox
|
|
3
|
-
Version: 2.0
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: SDK for Geobox's APIs
|
|
5
5
|
Author-email: Hamid Heydari <heydari.h62@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -74,6 +74,20 @@ task = client.get_tasks()[0]
|
|
|
74
74
|
task.wait() # shows progress bar by default. use progress_bar=False to disable it.
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
+
Install with Async Support
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
pip install geobox[async]
|
|
81
|
+
```
|
|
82
|
+
```
|
|
83
|
+
from geobox.aio import AsyncGeoboxClient
|
|
84
|
+
|
|
85
|
+
async with AsyncGeoboxClient() as client:
|
|
86
|
+
files = await client.get_files()
|
|
87
|
+
downloads = [file.download() for file in files]
|
|
88
|
+
await asyncio.gather(*downloads) # downloads multiple file asynchronously
|
|
89
|
+
```
|
|
90
|
+
|
|
77
91
|
Install with All Available Dependencies
|
|
78
92
|
|
|
79
93
|
```
|
|
@@ -1,66 +1,80 @@
|
|
|
1
|
-
[<img width="200" alt="Geobox logo" src="https://www.geobox.ir/wp-content/uploads/2022/05/geologo-slider.png">](https://www.geobox.ir/)
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Geobox® is a cloud-based GIS platform that enables users (local governments, companies and individuals) to easily upload their geo-spatial data, publish them as geo-services, visualize and analyze their geo-content (geo-data or -services) and share them with others. Geobox is a modern, world-class and cloud-ready geo-spatial platform that provides standard, safe, efficient and easy to use GI-Services.
|
|
5
|
-
|
|
6
|
-
Geobox python SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically. This comprehensive toolkit empowers applications to leverage advanced geospatial capabilities including data management and analysis.
|
|
7
|
-
|
|
8
|
-
[Here](https://geobox.readthedocs.io) you can find the official documentation for Geobox Python SDK.
|
|
9
|
-
|
|
10
|
-
Installation
|
|
11
|
-
============
|
|
12
|
-
|
|
13
|
-
Enable Virtualenv and Install Dependencies:
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
pip install geobox
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Install with Geometry Dependencies
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
pip install geobox[geometry]
|
|
23
|
-
```
|
|
24
|
-
```
|
|
25
|
-
from geobox import GeoboxClient
|
|
26
|
-
|
|
27
|
-
client = GeoboxClient()
|
|
28
|
-
|
|
29
|
-
layer = client.get_vectors(search='tehran')[0]
|
|
30
|
-
feature = layer.get_feature(feature_id=1)
|
|
31
|
-
geom = feature.geometry
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Install with Progress Bar Support
|
|
35
|
-
|
|
36
|
-
```
|
|
37
|
-
pip install geobox[tqdm]
|
|
38
|
-
```
|
|
39
|
-
```
|
|
40
|
-
from geobox import GeoboxClient
|
|
41
|
-
|
|
42
|
-
client = GeoboxClient()
|
|
43
|
-
|
|
44
|
-
task = client.get_tasks()[0]
|
|
45
|
-
task.wait() # shows progress bar by default. use progress_bar=False to disable it.
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Install with
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
pip install geobox[
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
[<img width="200" alt="Geobox logo" src="https://www.geobox.ir/wp-content/uploads/2022/05/geologo-slider.png">](https://www.geobox.ir/)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Geobox® is a cloud-based GIS platform that enables users (local governments, companies and individuals) to easily upload their geo-spatial data, publish them as geo-services, visualize and analyze their geo-content (geo-data or -services) and share them with others. Geobox is a modern, world-class and cloud-ready geo-spatial platform that provides standard, safe, efficient and easy to use GI-Services.
|
|
5
|
+
|
|
6
|
+
Geobox python SDK provides seamless integration with the Geobox API, enabling developers to work with geospatial data and services programmatically. This comprehensive toolkit empowers applications to leverage advanced geospatial capabilities including data management and analysis.
|
|
7
|
+
|
|
8
|
+
[Here](https://geobox.readthedocs.io) you can find the official documentation for Geobox Python SDK.
|
|
9
|
+
|
|
10
|
+
Installation
|
|
11
|
+
============
|
|
12
|
+
|
|
13
|
+
Enable Virtualenv and Install Dependencies:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
pip install geobox
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Install with Geometry Dependencies
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
pip install geobox[geometry]
|
|
23
|
+
```
|
|
24
|
+
```
|
|
25
|
+
from geobox import GeoboxClient
|
|
26
|
+
|
|
27
|
+
client = GeoboxClient()
|
|
28
|
+
|
|
29
|
+
layer = client.get_vectors(search='tehran')[0]
|
|
30
|
+
feature = layer.get_feature(feature_id=1)
|
|
31
|
+
geom = feature.geometry
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Install with Progress Bar Support
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
pip install geobox[tqdm]
|
|
38
|
+
```
|
|
39
|
+
```
|
|
40
|
+
from geobox import GeoboxClient
|
|
41
|
+
|
|
42
|
+
client = GeoboxClient()
|
|
43
|
+
|
|
44
|
+
task = client.get_tasks()[0]
|
|
45
|
+
task.wait() # shows progress bar by default. use progress_bar=False to disable it.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Install with Async Support
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
pip install geobox[async]
|
|
52
|
+
```
|
|
53
|
+
```
|
|
54
|
+
from geobox.aio import AsyncGeoboxClient
|
|
55
|
+
|
|
56
|
+
async with AsyncGeoboxClient() as client:
|
|
57
|
+
files = await client.get_files()
|
|
58
|
+
downloads = [file.download() for file in files]
|
|
59
|
+
await asyncio.gather(*downloads) # downloads multiple file asynchronously
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Install with All Available Dependencies
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
pip install geobox[all]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
Example
|
|
70
|
+
=======
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
from geobox import GeoboxClient
|
|
74
|
+
|
|
75
|
+
client = GeoboxClient()
|
|
76
|
+
|
|
77
|
+
layer = client.get_vectors(search='tehran')[0]
|
|
78
|
+
features = layer.get_features(out_srid=4326, bbox_srid=4326)
|
|
79
|
+
fields = layer.get_fields()
|
|
66
80
|
```
|
|
@@ -1,63 +1,61 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Geobox SDK
|
|
3
|
-
|
|
4
|
-
This package provides classes and functions to interact with the Geobox API.
|
|
5
|
-
|
|
6
|
-
Modules:
|
|
7
|
-
api (module): Contains the Api class for making API requests.
|
|
8
|
-
vectors (module): Contains classes for interacting with vector layers, fields, and features.
|
|
9
|
-
exception (module): Contains custom exception classes for error handling.
|
|
10
|
-
|
|
11
|
-
Classes:
|
|
12
|
-
Api: A class to interact with the GeoBox API.
|
|
13
|
-
VectorLayers: A class to interact with vector layers in the GeoBox API.
|
|
14
|
-
Fields: A class to interact with fields in a vector layer.
|
|
15
|
-
Features: A class to interact with features in a vector layer.
|
|
16
|
-
GeoboxError: Base class for all exceptions raised by the GeoBox SDK.
|
|
17
|
-
AuthenticationError: Raised when there is an authentication error.
|
|
18
|
-
AuthorizationError: Raised when there is an authorization error.
|
|
19
|
-
ApiRequestError: Raised when there is an error with the API request.
|
|
20
|
-
NotFoundError: Raised when a requested resource is not found.
|
|
21
|
-
ValidationError: Raised when there is a validation error.
|
|
22
|
-
ServerError: Raised when there is a server error.
|
|
23
|
-
"""
|
|
24
|
-
import logging, os, dotenv
|
|
25
|
-
from .api import GeoboxClient
|
|
26
|
-
|
|
27
|
-
from .exception import (
|
|
28
|
-
GeoboxError,
|
|
29
|
-
AuthenticationError,
|
|
30
|
-
AuthorizationError,
|
|
31
|
-
ApiRequestError,
|
|
32
|
-
NotFoundError,
|
|
33
|
-
ValidationError,
|
|
34
|
-
ServerError
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
dotenv.load_dotenv()
|
|
38
|
-
DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'
|
|
39
|
-
|
|
40
|
-
logger = logging.getLogger(__name__)
|
|
41
|
-
if DEBUG:
|
|
42
|
-
logging.basicConfig(
|
|
43
|
-
level=logging.DEBUG,
|
|
44
|
-
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
45
|
-
)
|
|
46
|
-
logger.info("Logging is set to DEBUG level.")
|
|
47
|
-
else:
|
|
48
|
-
logging.basicConfig(level=logging.WARNING)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
__all__ = [
|
|
52
|
-
'GeoboxClient',
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
]
|
|
63
|
-
|
|
1
|
+
"""
|
|
2
|
+
Geobox SDK
|
|
3
|
+
|
|
4
|
+
This package provides classes and functions to interact with the Geobox API.
|
|
5
|
+
|
|
6
|
+
Modules:
|
|
7
|
+
api (module): Contains the Api class for making API requests.
|
|
8
|
+
vectors (module): Contains classes for interacting with vector layers, fields, and features.
|
|
9
|
+
exception (module): Contains custom exception classes for error handling.
|
|
10
|
+
|
|
11
|
+
Classes:
|
|
12
|
+
Api: A class to interact with the GeoBox API.
|
|
13
|
+
VectorLayers: A class to interact with vector layers in the GeoBox API.
|
|
14
|
+
Fields: A class to interact with fields in a vector layer.
|
|
15
|
+
Features: A class to interact with features in a vector layer.
|
|
16
|
+
GeoboxError: Base class for all exceptions raised by the GeoBox SDK.
|
|
17
|
+
AuthenticationError: Raised when there is an authentication error.
|
|
18
|
+
AuthorizationError: Raised when there is an authorization error.
|
|
19
|
+
ApiRequestError: Raised when there is an error with the API request.
|
|
20
|
+
NotFoundError: Raised when a requested resource is not found.
|
|
21
|
+
ValidationError: Raised when there is a validation error.
|
|
22
|
+
ServerError: Raised when there is a server error.
|
|
23
|
+
"""
|
|
24
|
+
import logging, os, dotenv
|
|
25
|
+
from .api import GeoboxClient
|
|
26
|
+
|
|
27
|
+
from .exception import (
|
|
28
|
+
GeoboxError,
|
|
29
|
+
AuthenticationError,
|
|
30
|
+
AuthorizationError,
|
|
31
|
+
ApiRequestError,
|
|
32
|
+
NotFoundError,
|
|
33
|
+
ValidationError,
|
|
34
|
+
ServerError
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
dotenv.load_dotenv()
|
|
38
|
+
DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'
|
|
39
|
+
|
|
40
|
+
logger = logging.getLogger(__name__)
|
|
41
|
+
if DEBUG:
|
|
42
|
+
logging.basicConfig(
|
|
43
|
+
level=logging.DEBUG,
|
|
44
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
45
|
+
)
|
|
46
|
+
logger.info("Logging is set to DEBUG level.")
|
|
47
|
+
else:
|
|
48
|
+
logging.basicConfig(level=logging.WARNING)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
__all__ = [
|
|
52
|
+
'GeoboxClient',
|
|
53
|
+
'GeoboxError',
|
|
54
|
+
'AuthenticationError',
|
|
55
|
+
'AuthorizationError',
|
|
56
|
+
'ApiRequestError',
|
|
57
|
+
'NotFoundError',
|
|
58
|
+
'ValidationError',
|
|
59
|
+
'ServerError'
|
|
60
|
+
]
|
|
61
|
+
|
|
@@ -1,63 +1,61 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Geobox SDK
|
|
3
|
-
|
|
4
|
-
This package provides classes and functions to interact with the Geobox API.
|
|
5
|
-
|
|
6
|
-
Modules:
|
|
7
|
-
api (module): Contains the Api class for making API requests.
|
|
8
|
-
vectors (module): Contains classes for interacting with vector layers, fields, and features.
|
|
9
|
-
exception (module): Contains custom exception classes for error handling.
|
|
10
|
-
|
|
11
|
-
Classes:
|
|
12
|
-
Api: A class to interact with the GeoBox API.
|
|
13
|
-
VectorLayers: A class to interact with vector layers in the GeoBox API.
|
|
14
|
-
Fields: A class to interact with fields in a vector layer.
|
|
15
|
-
Features: A class to interact with features in a vector layer.
|
|
16
|
-
GeoboxError: Base class for all exceptions raised by the GeoBox SDK.
|
|
17
|
-
AuthenticationError: Raised when there is an authentication error.
|
|
18
|
-
AuthorizationError: Raised when there is an authorization error.
|
|
19
|
-
ApiRequestError: Raised when there is an error with the API request.
|
|
20
|
-
NotFoundError: Raised when a requested resource is not found.
|
|
21
|
-
ValidationError: Raised when there is a validation error.
|
|
22
|
-
ServerError: Raised when there is a server error.
|
|
23
|
-
"""
|
|
24
|
-
import logging, os, dotenv
|
|
25
|
-
from .api import AsyncGeoboxClient
|
|
26
|
-
|
|
27
|
-
from ..exception import (
|
|
28
|
-
GeoboxError,
|
|
29
|
-
AuthenticationError,
|
|
30
|
-
AuthorizationError,
|
|
31
|
-
ApiRequestError,
|
|
32
|
-
NotFoundError,
|
|
33
|
-
ValidationError,
|
|
34
|
-
ServerError
|
|
35
|
-
)
|
|
36
|
-
|
|
37
|
-
dotenv.load_dotenv()
|
|
38
|
-
DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'
|
|
39
|
-
|
|
40
|
-
logger = logging.getLogger(__name__)
|
|
41
|
-
if DEBUG:
|
|
42
|
-
logging.basicConfig(
|
|
43
|
-
level=logging.DEBUG,
|
|
44
|
-
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
45
|
-
)
|
|
46
|
-
logger.info("Logging is set to DEBUG level.")
|
|
47
|
-
else:
|
|
48
|
-
logging.basicConfig(level=logging.WARNING)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
__all__ = [
|
|
52
|
-
'AsyncGeoboxClient',
|
|
53
|
-
'
|
|
54
|
-
'
|
|
55
|
-
'
|
|
56
|
-
'
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
]
|
|
63
|
-
|
|
1
|
+
"""
|
|
2
|
+
Geobox SDK
|
|
3
|
+
|
|
4
|
+
This package provides classes and functions to interact with the Geobox API.
|
|
5
|
+
|
|
6
|
+
Modules:
|
|
7
|
+
api (module): Contains the Api class for making API requests.
|
|
8
|
+
vectors (module): Contains classes for interacting with vector layers, fields, and features.
|
|
9
|
+
exception (module): Contains custom exception classes for error handling.
|
|
10
|
+
|
|
11
|
+
Classes:
|
|
12
|
+
Api: A class to interact with the GeoBox API.
|
|
13
|
+
VectorLayers: A class to interact with vector layers in the GeoBox API.
|
|
14
|
+
Fields: A class to interact with fields in a vector layer.
|
|
15
|
+
Features: A class to interact with features in a vector layer.
|
|
16
|
+
GeoboxError: Base class for all exceptions raised by the GeoBox SDK.
|
|
17
|
+
AuthenticationError: Raised when there is an authentication error.
|
|
18
|
+
AuthorizationError: Raised when there is an authorization error.
|
|
19
|
+
ApiRequestError: Raised when there is an error with the API request.
|
|
20
|
+
NotFoundError: Raised when a requested resource is not found.
|
|
21
|
+
ValidationError: Raised when there is a validation error.
|
|
22
|
+
ServerError: Raised when there is a server error.
|
|
23
|
+
"""
|
|
24
|
+
import logging, os, dotenv
|
|
25
|
+
from .api import AsyncGeoboxClient
|
|
26
|
+
|
|
27
|
+
from ..exception import (
|
|
28
|
+
GeoboxError,
|
|
29
|
+
AuthenticationError,
|
|
30
|
+
AuthorizationError,
|
|
31
|
+
ApiRequestError,
|
|
32
|
+
NotFoundError,
|
|
33
|
+
ValidationError,
|
|
34
|
+
ServerError
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
dotenv.load_dotenv()
|
|
38
|
+
DEBUG = os.getenv('DEBUG', 'False').lower() == 'true'
|
|
39
|
+
|
|
40
|
+
logger = logging.getLogger(__name__)
|
|
41
|
+
if DEBUG:
|
|
42
|
+
logging.basicConfig(
|
|
43
|
+
level=logging.DEBUG,
|
|
44
|
+
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
|
45
|
+
)
|
|
46
|
+
logger.info("Logging is set to DEBUG level.")
|
|
47
|
+
else:
|
|
48
|
+
logging.basicConfig(level=logging.WARNING)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
__all__ = [
|
|
52
|
+
'AsyncGeoboxClient',
|
|
53
|
+
'GeoboxError',
|
|
54
|
+
'AuthenticationError',
|
|
55
|
+
'AuthorizationError',
|
|
56
|
+
'ApiRequestError',
|
|
57
|
+
'NotFoundError',
|
|
58
|
+
'ValidationError',
|
|
59
|
+
'ServerError'
|
|
60
|
+
]
|
|
61
|
+
|