pygeobox 1.0.1__py3-none-any.whl → 1.0.3__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.
pygeobox/__init__.py CHANGED
@@ -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
+