cecil 0.0.25__py3-none-any.whl → 0.0.27__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.
Potentially problematic release.
This version of cecil might be problematic. Click here for more details.
- cecil/client.py +7 -1
- cecil/errors.py +11 -0
- cecil/version.py +1 -1
- {cecil-0.0.25.dist-info → cecil-0.0.27.dist-info}/METADATA +3 -3
- cecil-0.0.27.dist-info/RECORD +10 -0
- cecil-0.0.25.dist-info/RECORD +0 -10
- {cecil-0.0.25.dist-info → cecil-0.0.27.dist-info}/WHEEL +0 -0
- {cecil-0.0.25.dist-info → cecil-0.0.27.dist-info}/licenses/LICENSE.txt +0 -0
cecil/client.py
CHANGED
|
@@ -14,6 +14,7 @@ from warnings import warn
|
|
|
14
14
|
from .errors import (
|
|
15
15
|
Error,
|
|
16
16
|
_handle_bad_request,
|
|
17
|
+
_handle_method_not_allowed,
|
|
17
18
|
_handle_not_found,
|
|
18
19
|
_handle_too_many_requests,
|
|
19
20
|
_handle_unprocessable_entity,
|
|
@@ -99,7 +100,10 @@ class Client:
|
|
|
99
100
|
"c1ee0d62-95ef-49b1-adf1-6a5a933d726d": "data_request_db.ibat.wdpa",
|
|
100
101
|
}[data_request.dataset_id]
|
|
101
102
|
except KeyError:
|
|
102
|
-
raise
|
|
103
|
+
raise Error(
|
|
104
|
+
"method not allowed",
|
|
105
|
+
{"message": "load_dataframe() is not supported for raster datasets."},
|
|
106
|
+
)
|
|
103
107
|
|
|
104
108
|
return self._query(
|
|
105
109
|
f"select * from {secure_view} where data_request_id = '{data_request_id}'"
|
|
@@ -253,6 +257,8 @@ class Client:
|
|
|
253
257
|
raise Error("unauthorised")
|
|
254
258
|
case 404:
|
|
255
259
|
_handle_not_found(err.response)
|
|
260
|
+
case 405:
|
|
261
|
+
_handle_method_not_allowed(err.response)
|
|
256
262
|
case 422:
|
|
257
263
|
_handle_unprocessable_entity(err.response)
|
|
258
264
|
case 429:
|
cecil/errors.py
CHANGED
|
@@ -36,6 +36,17 @@ def _handle_bad_request(response):
|
|
|
36
36
|
raise Error("bad request", details)
|
|
37
37
|
|
|
38
38
|
|
|
39
|
+
def _handle_method_not_allowed(response):
|
|
40
|
+
if not _is_json(response.text):
|
|
41
|
+
raise Error("method not allowed")
|
|
42
|
+
|
|
43
|
+
details = {}
|
|
44
|
+
for key, value in response.json().items():
|
|
45
|
+
details[_format_json_key(key)] = value
|
|
46
|
+
|
|
47
|
+
raise Error("method not allowed", details)
|
|
48
|
+
|
|
49
|
+
|
|
39
50
|
def _handle_not_found(response):
|
|
40
51
|
if not _is_json(response.text):
|
|
41
52
|
raise Error("resource not found")
|
cecil/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.0.
|
|
1
|
+
__version__ = "0.0.27"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: cecil
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.27
|
|
4
4
|
Summary: Python SDK for Cecil Earth
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE.txt
|
|
@@ -8,13 +8,13 @@ Classifier: Development Status :: 4 - Beta
|
|
|
8
8
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
9
|
Classifier: Operating System :: OS Independent
|
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
|
11
|
-
Requires-Python: >=3.
|
|
11
|
+
Requires-Python: >=3.10
|
|
12
12
|
Requires-Dist: dask==2025.9.1
|
|
13
13
|
Requires-Dist: pydantic<3.0.0,>=2.11.9
|
|
14
14
|
Requires-Dist: requests<3.0.0,>=2.32.5
|
|
15
15
|
Requires-Dist: rioxarray==0.19.0
|
|
16
16
|
Requires-Dist: snowflake-connector-python[pandas]<4.0.0,>=3.17.4
|
|
17
|
-
Requires-Dist: xarray==2025.
|
|
17
|
+
Requires-Dist: xarray==2025.6.1
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
|
|
20
20
|
# Cecil SDK
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
cecil/__init__.py,sha256=AEcRl73BDSAQe6W0d1PDD87IEcumARtREl7dCVa_YQY,86
|
|
2
|
+
cecil/client.py,sha256=JRTXn6Xc-sHINwUxN6eccpmETWnmkEgQtVp3guk4_h4,9553
|
|
3
|
+
cecil/errors.py,sha256=EnyYvFfU_JWYTTRax58bdwOndri2f-HzbqyzxtoV8uo,2100
|
|
4
|
+
cecil/models.py,sha256=3W892XywxLIZL6TDCHM8_PVRHzR48bJXT5kTV7UU_bY,3509
|
|
5
|
+
cecil/version.py,sha256=XJ5NZRv5ahaSlYm7_PUNTixULma76xIxwxi2Yy6Eb8w,23
|
|
6
|
+
cecil/xarray.py,sha256=CvqfJ7NBMLLA4jf73ek2ZtV3sj8xOII__5S0_l3KXYI,2161
|
|
7
|
+
cecil-0.0.27.dist-info/METADATA,sha256=uXiXe-K6mVSaRSou7tiT4YHwdffiftruP8d_1oAZPlg,2800
|
|
8
|
+
cecil-0.0.27.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
+
cecil-0.0.27.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
|
|
10
|
+
cecil-0.0.27.dist-info/RECORD,,
|
cecil-0.0.25.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
cecil/__init__.py,sha256=AEcRl73BDSAQe6W0d1PDD87IEcumARtREl7dCVa_YQY,86
|
|
2
|
-
cecil/client.py,sha256=cDvsK4qBLs5fR8xOPOJ8uH3hi5vVqN9YbRmI0d_kicM,9357
|
|
3
|
-
cecil/errors.py,sha256=ZNiSTYH2MgNZ7tNIgV07-Ge3KtmdncfzWiBi9yjURGs,1818
|
|
4
|
-
cecil/models.py,sha256=3W892XywxLIZL6TDCHM8_PVRHzR48bJXT5kTV7UU_bY,3509
|
|
5
|
-
cecil/version.py,sha256=ognSasPrsQjE8uJUk5Fcsl4caTERui00vZnmFlQnMoU,23
|
|
6
|
-
cecil/xarray.py,sha256=CvqfJ7NBMLLA4jf73ek2ZtV3sj8xOII__5S0_l3KXYI,2161
|
|
7
|
-
cecil-0.0.25.dist-info/METADATA,sha256=7fk1g-s_Dwp5SyZEBHaWwEje_XbuB29RO01UIYn-0_0,2800
|
|
8
|
-
cecil-0.0.25.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
9
|
-
cecil-0.0.25.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
|
|
10
|
-
cecil-0.0.25.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|