pygeobox 1.0.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.
- pygeobox-1.0.0/LICENSE +21 -0
- pygeobox-1.0.0/PKG-INFO +106 -0
- pygeobox-1.0.0/README.md +63 -0
- pygeobox-1.0.0/pygeobox/__init__.py +63 -0
- pygeobox-1.0.0/pygeobox/api.py +2518 -0
- pygeobox-1.0.0/pygeobox/apikey.py +233 -0
- pygeobox-1.0.0/pygeobox/attachment.py +298 -0
- pygeobox-1.0.0/pygeobox/base.py +364 -0
- pygeobox-1.0.0/pygeobox/basemap.py +163 -0
- pygeobox-1.0.0/pygeobox/dashboard.py +316 -0
- pygeobox-1.0.0/pygeobox/enums.py +355 -0
- pygeobox-1.0.0/pygeobox/exception.py +47 -0
- pygeobox-1.0.0/pygeobox/feature.py +508 -0
- pygeobox-1.0.0/pygeobox/field.py +309 -0
- pygeobox-1.0.0/pygeobox/file.py +494 -0
- pygeobox-1.0.0/pygeobox/log.py +101 -0
- pygeobox-1.0.0/pygeobox/map.py +858 -0
- pygeobox-1.0.0/pygeobox/model3d.py +334 -0
- pygeobox-1.0.0/pygeobox/mosaic.py +647 -0
- pygeobox-1.0.0/pygeobox/plan.py +261 -0
- pygeobox-1.0.0/pygeobox/query.py +668 -0
- pygeobox-1.0.0/pygeobox/raster.py +756 -0
- pygeobox-1.0.0/pygeobox/route.py +63 -0
- pygeobox-1.0.0/pygeobox/scene.py +317 -0
- pygeobox-1.0.0/pygeobox/settings.py +166 -0
- pygeobox-1.0.0/pygeobox/task.py +354 -0
- pygeobox-1.0.0/pygeobox/tile3d.py +295 -0
- pygeobox-1.0.0/pygeobox/tileset.py +585 -0
- pygeobox-1.0.0/pygeobox/usage.py +211 -0
- pygeobox-1.0.0/pygeobox/user.py +424 -0
- pygeobox-1.0.0/pygeobox/utils.py +44 -0
- pygeobox-1.0.0/pygeobox/vectorlayer.py +1150 -0
- pygeobox-1.0.0/pygeobox/version.py +249 -0
- pygeobox-1.0.0/pygeobox/view.py +859 -0
- pygeobox-1.0.0/pygeobox/workflow.py +315 -0
- pygeobox-1.0.0/pygeobox.egg-info/PKG-INFO +106 -0
- pygeobox-1.0.0/pygeobox.egg-info/SOURCES.txt +68 -0
- pygeobox-1.0.0/pygeobox.egg-info/dependency_links.txt +1 -0
- pygeobox-1.0.0/pygeobox.egg-info/requires.txt +32 -0
- pygeobox-1.0.0/pygeobox.egg-info/top_level.txt +1 -0
- pygeobox-1.0.0/pyproject.toml +31 -0
- pygeobox-1.0.0/setup.cfg +4 -0
- pygeobox-1.0.0/setup.py +22 -0
- pygeobox-1.0.0/tests/test_api.py +1950 -0
- pygeobox-1.0.0/tests/test_apikey.py +89 -0
- pygeobox-1.0.0/tests/test_attachment.py +142 -0
- pygeobox-1.0.0/tests/test_basemap.py +72 -0
- pygeobox-1.0.0/tests/test_dashboard.py +143 -0
- pygeobox-1.0.0/tests/test_feature.py +445 -0
- pygeobox-1.0.0/tests/test_field.py +247 -0
- pygeobox-1.0.0/tests/test_file.py +345 -0
- pygeobox-1.0.0/tests/test_log.py +34 -0
- pygeobox-1.0.0/tests/test_map.py +613 -0
- pygeobox-1.0.0/tests/test_model3d.py +211 -0
- pygeobox-1.0.0/tests/test_mosaic.py +359 -0
- pygeobox-1.0.0/tests/test_plan.py +73 -0
- pygeobox-1.0.0/tests/test_query.py +461 -0
- pygeobox-1.0.0/tests/test_raster.py +380 -0
- pygeobox-1.0.0/tests/test_route.py +18 -0
- pygeobox-1.0.0/tests/test_scene.py +136 -0
- pygeobox-1.0.0/tests/test_settings.py +43 -0
- pygeobox-1.0.0/tests/test_task.py +234 -0
- pygeobox-1.0.0/tests/test_tile3d.py +130 -0
- pygeobox-1.0.0/tests/test_tileset.py +312 -0
- pygeobox-1.0.0/tests/test_usage.py +112 -0
- pygeobox-1.0.0/tests/test_user.py +148 -0
- pygeobox-1.0.0/tests/test_vectorlayer.py +667 -0
- pygeobox-1.0.0/tests/test_version.py +116 -0
- pygeobox-1.0.0/tests/test_view.py +728 -0
- pygeobox-1.0.0/tests/test_workflow.py +136 -0
pygeobox-1.0.0/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 Geobox
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
pygeobox-1.0.0/PKG-INFO
ADDED
@@ -0,0 +1,106 @@
|
|
1
|
+
Metadata-Version: 2.4
|
2
|
+
Name: pygeobox
|
3
|
+
Version: 1.0.0
|
4
|
+
Summary: SDK for Geobox's APIs
|
5
|
+
Home-page: https://gitlab.com/geobox-sdks/pygeobox.git
|
6
|
+
Author: Hamid Heydari
|
7
|
+
Author-email: Hamid Heydari <heydari.h62@gmail.com>
|
8
|
+
License: MIT
|
9
|
+
Project-URL: Homepage, https://gitlab.com/geobox-sdks/pygeobox.git
|
10
|
+
Requires-Python: >=3.7
|
11
|
+
Description-Content-Type: text/markdown
|
12
|
+
License-File: LICENSE
|
13
|
+
Requires-Dist: requests
|
14
|
+
Requires-Dist: python-dotenv
|
15
|
+
Provides-Extra: geometry
|
16
|
+
Requires-Dist: shapely; extra == "geometry"
|
17
|
+
Requires-Dist: pyproj; extra == "geometry"
|
18
|
+
Provides-Extra: tqdm
|
19
|
+
Requires-Dist: tqdm; extra == "tqdm"
|
20
|
+
Requires-Dist: ipywidgets; extra == "tqdm"
|
21
|
+
Provides-Extra: test
|
22
|
+
Requires-Dist: pytest; extra == "test"
|
23
|
+
Requires-Dist: shapely; extra == "test"
|
24
|
+
Requires-Dist: pyproj; extra == "test"
|
25
|
+
Requires-Dist: pytest-cov; extra == "test"
|
26
|
+
Provides-Extra: docs
|
27
|
+
Requires-Dist: Sphinx; extra == "docs"
|
28
|
+
Requires-Dist: sphinx-rtd-theme; extra == "docs"
|
29
|
+
Requires-Dist: sphinx-copybutton; extra == "docs"
|
30
|
+
Provides-Extra: all
|
31
|
+
Requires-Dist: shapely; extra == "all"
|
32
|
+
Requires-Dist: pyproj; extra == "all"
|
33
|
+
Requires-Dist: pytest; extra == "all"
|
34
|
+
Requires-Dist: pytest-cov; extra == "all"
|
35
|
+
Requires-Dist: tqdm; extra == "all"
|
36
|
+
Requires-Dist: ipywidgets; extra == "all"
|
37
|
+
Requires-Dist: Sphinx; extra == "all"
|
38
|
+
Requires-Dist: sphinx-rtd-theme; extra == "all"
|
39
|
+
Requires-Dist: sphinx-copybutton; extra == "all"
|
40
|
+
Dynamic: author
|
41
|
+
Dynamic: home-page
|
42
|
+
Dynamic: license-file
|
43
|
+
|
44
|
+
[<img width="200" alt="Geobox logo" src="LOGO.png">](https://www.geobox.ir/)
|
45
|
+
|
46
|
+
# Geobox
|
47
|
+
SDK for Geobox's APIs
|
48
|
+
|
49
|
+
Installation
|
50
|
+
============
|
51
|
+
|
52
|
+
Clone the Repo, cd Into the Repo Folder, Create and Enable Virtualenv, Install Dependencies and Run Tests:
|
53
|
+
|
54
|
+
```
|
55
|
+
cd geobox
|
56
|
+
python -m venv .venv
|
57
|
+
source .venv/bin/activate
|
58
|
+
pip install -e .
|
59
|
+
```
|
60
|
+
|
61
|
+
Install with Geometry Dependencies
|
62
|
+
|
63
|
+
```
|
64
|
+
pip install -e .[geometry]
|
65
|
+
```
|
66
|
+
|
67
|
+
Install with Documentation Dependencies
|
68
|
+
|
69
|
+
```
|
70
|
+
pip install -e .[docs]
|
71
|
+
cd geobox_docs
|
72
|
+
make.bat html
|
73
|
+
```
|
74
|
+
|
75
|
+
Install with Test Dependencies
|
76
|
+
|
77
|
+
```
|
78
|
+
pip install -e .[test]
|
79
|
+
pytest -vv
|
80
|
+
```
|
81
|
+
|
82
|
+
and generate coverage report
|
83
|
+
|
84
|
+
```
|
85
|
+
pytest --cov=geobox --cov-report=html
|
86
|
+
```
|
87
|
+
|
88
|
+
Install with All Available Dependencies
|
89
|
+
|
90
|
+
```
|
91
|
+
pip install -e .[all]
|
92
|
+
```
|
93
|
+
|
94
|
+
|
95
|
+
Example
|
96
|
+
=======
|
97
|
+
|
98
|
+
```
|
99
|
+
from geobox import GeoboxClient
|
100
|
+
|
101
|
+
client = GeoboxClient()
|
102
|
+
|
103
|
+
layer = client.get_vectors(search='tehran')[0]
|
104
|
+
features = layer.get_features(out_srid=4326, bbox_srid=4326)
|
105
|
+
fields = layer.get_fields()
|
106
|
+
```
|
pygeobox-1.0.0/README.md
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
[<img width="200" alt="Geobox logo" src="LOGO.png">](https://www.geobox.ir/)
|
2
|
+
|
3
|
+
# Geobox
|
4
|
+
SDK for Geobox's APIs
|
5
|
+
|
6
|
+
Installation
|
7
|
+
============
|
8
|
+
|
9
|
+
Clone the Repo, cd Into the Repo Folder, Create and Enable Virtualenv, Install Dependencies and Run Tests:
|
10
|
+
|
11
|
+
```
|
12
|
+
cd geobox
|
13
|
+
python -m venv .venv
|
14
|
+
source .venv/bin/activate
|
15
|
+
pip install -e .
|
16
|
+
```
|
17
|
+
|
18
|
+
Install with Geometry Dependencies
|
19
|
+
|
20
|
+
```
|
21
|
+
pip install -e .[geometry]
|
22
|
+
```
|
23
|
+
|
24
|
+
Install with Documentation Dependencies
|
25
|
+
|
26
|
+
```
|
27
|
+
pip install -e .[docs]
|
28
|
+
cd geobox_docs
|
29
|
+
make.bat html
|
30
|
+
```
|
31
|
+
|
32
|
+
Install with Test Dependencies
|
33
|
+
|
34
|
+
```
|
35
|
+
pip install -e .[test]
|
36
|
+
pytest -vv
|
37
|
+
```
|
38
|
+
|
39
|
+
and generate coverage report
|
40
|
+
|
41
|
+
```
|
42
|
+
pytest --cov=geobox --cov-report=html
|
43
|
+
```
|
44
|
+
|
45
|
+
Install with All Available Dependencies
|
46
|
+
|
47
|
+
```
|
48
|
+
pip install -e .[all]
|
49
|
+
```
|
50
|
+
|
51
|
+
|
52
|
+
Example
|
53
|
+
=======
|
54
|
+
|
55
|
+
```
|
56
|
+
from geobox import GeoboxClient
|
57
|
+
|
58
|
+
client = GeoboxClient()
|
59
|
+
|
60
|
+
layer = client.get_vectors(search='tehran')[0]
|
61
|
+
features = layer.get_features(out_srid=4326, bbox_srid=4326)
|
62
|
+
fields = layer.get_fields()
|
63
|
+
```
|
@@ -0,0 +1,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
|
+
'Feature',
|
54
|
+
'VectorLayer',
|
55
|
+
'GeoboxError',
|
56
|
+
'AuthenticationError',
|
57
|
+
'AuthorizationError',
|
58
|
+
'ApiRequestError',
|
59
|
+
'NotFoundError',
|
60
|
+
'ValidationError',
|
61
|
+
'ServerError'
|
62
|
+
]
|
63
|
+
|