pygeobox 1.0.0__tar.gz → 1.0.2__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.
Files changed (71) hide show
  1. {pygeobox-1.0.0 → pygeobox-1.0.2}/LICENSE +21 -21
  2. {pygeobox-1.0.0 → pygeobox-1.0.2}/PKG-INFO +22 -31
  3. pygeobox-1.0.2/README.md +62 -0
  4. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/__init__.py +63 -63
  5. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/api.py +2517 -2517
  6. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/apikey.py +232 -232
  7. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/attachment.py +297 -297
  8. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/base.py +364 -364
  9. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/basemap.py +162 -162
  10. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/dashboard.py +316 -316
  11. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/enums.py +354 -354
  12. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/exception.py +47 -47
  13. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/feature.py +0 -0
  14. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/field.py +309 -309
  15. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/map.py +858 -858
  16. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/model3d.py +334 -334
  17. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/mosaic.py +647 -647
  18. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/plan.py +260 -260
  19. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/query.py +668 -668
  20. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/raster.py +756 -756
  21. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/route.py +63 -63
  22. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/scene.py +317 -317
  23. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/settings.py +165 -165
  24. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/task.py +354 -354
  25. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/tile3d.py +294 -294
  26. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/tileset.py +585 -585
  27. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/user.py +423 -423
  28. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/utils.py +43 -43
  29. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/vectorlayer.py +1149 -1149
  30. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/version.py +248 -248
  31. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/view.py +859 -859
  32. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/workflow.py +315 -315
  33. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/PKG-INFO +22 -31
  34. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/SOURCES.txt +0 -1
  35. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/requires.txt +0 -5
  36. {pygeobox-1.0.0 → pygeobox-1.0.2}/pyproject.toml +6 -4
  37. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_api.py +1949 -1949
  38. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_feature.py +444 -444
  39. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_field.py +246 -246
  40. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_file.py +345 -345
  41. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_map.py +0 -0
  42. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_model3d.py +211 -211
  43. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_mosaic.py +358 -358
  44. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_query.py +460 -460
  45. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_task.py +234 -234
  46. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_tileset.py +312 -312
  47. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_user.py +148 -148
  48. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_vectorlayer.py +667 -667
  49. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_view.py +727 -727
  50. pygeobox-1.0.0/README.md +0 -63
  51. pygeobox-1.0.0/setup.py +0 -22
  52. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/file.py +0 -0
  53. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/log.py +0 -0
  54. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox/usage.py +0 -0
  55. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/dependency_links.txt +0 -0
  56. {pygeobox-1.0.0 → pygeobox-1.0.2}/pygeobox.egg-info/top_level.txt +0 -0
  57. {pygeobox-1.0.0 → pygeobox-1.0.2}/setup.cfg +0 -0
  58. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_apikey.py +0 -0
  59. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_attachment.py +0 -0
  60. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_basemap.py +0 -0
  61. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_dashboard.py +0 -0
  62. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_log.py +0 -0
  63. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_plan.py +0 -0
  64. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_raster.py +0 -0
  65. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_route.py +0 -0
  66. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_scene.py +0 -0
  67. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_settings.py +0 -0
  68. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_tile3d.py +0 -0
  69. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_usage.py +0 -0
  70. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_version.py +0 -0
  71. {pygeobox-1.0.0 → pygeobox-1.0.2}/tests/test_workflow.py +0 -0
@@ -1,21 +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.
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.
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pygeobox
3
- Version: 1.0.0
3
+ Version: 1.0.2
4
4
  Summary: SDK for Geobox's APIs
5
- Home-page: https://gitlab.com/geobox-sdks/pygeobox.git
6
- Author: Hamid Heydari
7
5
  Author-email: Hamid Heydari <heydari.h62@gmail.com>
8
6
  License: MIT
9
- Project-URL: Homepage, https://gitlab.com/geobox-sdks/pygeobox.git
7
+ Project-URL: Homepage, https://geobox.ir
8
+ Project-URL: Documentation, https://geobox.ir
10
9
  Requires-Python: >=3.7
11
10
  Description-Content-Type: text/markdown
12
11
  License-File: LICENSE
@@ -30,18 +29,11 @@ Requires-Dist: sphinx-copybutton; extra == "docs"
30
29
  Provides-Extra: all
31
30
  Requires-Dist: shapely; extra == "all"
32
31
  Requires-Dist: pyproj; extra == "all"
33
- Requires-Dist: pytest; extra == "all"
34
- Requires-Dist: pytest-cov; extra == "all"
35
32
  Requires-Dist: tqdm; extra == "all"
36
33
  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
34
  Dynamic: license-file
43
35
 
44
- [<img width="200" alt="Geobox logo" src="LOGO.png">](https://www.geobox.ir/)
36
+ [<img width="200" alt="Geobox logo" src="https://www.geobox.ir/wp-content/uploads/2022/05/geologo-slider.png">](https://www.geobox.ir/)
45
37
 
46
38
  # Geobox
47
39
  SDK for Geobox's APIs
@@ -49,46 +41,45 @@ SDK for Geobox's APIs
49
41
  Installation
50
42
  ============
51
43
 
52
- Clone the Repo, cd Into the Repo Folder, Create and Enable Virtualenv, Install Dependencies and Run Tests:
44
+ Enable Virtualenv, Install Dependencies and Run Tests:
53
45
 
54
46
  ```
55
- cd geobox
56
- python -m venv .venv
57
- source .venv/bin/activate
58
- pip install -e .
47
+ pip install pygeobox
59
48
  ```
60
49
 
61
50
  Install with Geometry Dependencies
62
51
 
63
52
  ```
64
- pip install -e .[geometry]
53
+ pip install pygeobox[geometry]
65
54
  ```
55
+ ```
56
+ from pygeobox import GeoboxClient
66
57
 
67
- Install with Documentation Dependencies
58
+ client = GeoboxClient()
68
59
 
69
- ```
70
- pip install -e .[docs]
71
- cd geobox_docs
72
- make.bat html
60
+ layer = client.get_vectors(search='tehran')[0]
61
+ features = layer.get_feature(feature_id=1)
62
+ geom = feature.geometry
73
63
  ```
74
64
 
75
- Install with Test Dependencies
65
+ Install with Progress Bar Support
76
66
 
77
67
  ```
78
- pip install -e .[test]
79
- pytest -vv
68
+ pip install pygeobox[tqdm]
80
69
  ```
70
+ ```
71
+ from pygeobox import GeoboxClient
81
72
 
82
- and generate coverage report
73
+ client = GeoboxClient()
83
74
 
84
- ```
85
- pytest --cov=geobox --cov-report=html
75
+ task = client.geet_tasks()[0]
76
+ task.wait() # shows progress bar by default. use progress_bar=False to disable it.
86
77
  ```
87
78
 
88
79
  Install with All Available Dependencies
89
80
 
90
81
  ```
91
- pip install -e .[all]
82
+ pip install pygeobox[all]
92
83
  ```
93
84
 
94
85
 
@@ -96,7 +87,7 @@ Example
96
87
  =======
97
88
 
98
89
  ```
99
- from geobox import GeoboxClient
90
+ from pygeobox import GeoboxClient
100
91
 
101
92
  client = GeoboxClient()
102
93
 
@@ -0,0 +1,62 @@
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
+ # Geobox
4
+ SDK for Geobox's APIs
5
+
6
+ Installation
7
+ ============
8
+
9
+ Enable Virtualenv, Install Dependencies and Run Tests:
10
+
11
+ ```
12
+ pip install pygeobox
13
+ ```
14
+
15
+ Install with Geometry Dependencies
16
+
17
+ ```
18
+ pip install pygeobox[geometry]
19
+ ```
20
+ ```
21
+ from pygeobox import GeoboxClient
22
+
23
+ client = GeoboxClient()
24
+
25
+ layer = client.get_vectors(search='tehran')[0]
26
+ features = layer.get_feature(feature_id=1)
27
+ geom = feature.geometry
28
+ ```
29
+
30
+ Install with Progress Bar Support
31
+
32
+ ```
33
+ pip install pygeobox[tqdm]
34
+ ```
35
+ ```
36
+ from pygeobox import GeoboxClient
37
+
38
+ client = GeoboxClient()
39
+
40
+ task = client.geet_tasks()[0]
41
+ task.wait() # shows progress bar by default. use progress_bar=False to disable it.
42
+ ```
43
+
44
+ Install with All Available Dependencies
45
+
46
+ ```
47
+ pip install pygeobox[all]
48
+ ```
49
+
50
+
51
+ Example
52
+ =======
53
+
54
+ ```
55
+ from pygeobox import GeoboxClient
56
+
57
+ client = GeoboxClient()
58
+
59
+ layer = client.get_vectors(search='tehran')[0]
60
+ features = layer.get_features(out_srid=4326, bbox_srid=4326)
61
+ fields = layer.get_fields()
62
+ ```
@@ -1,63 +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
-
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
+