cecil 0.0.19__py3-none-any.whl → 0.0.20__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 CHANGED
@@ -17,6 +17,7 @@ from .errors import (
17
17
  )
18
18
  from .models import (
19
19
  AOI,
20
+ AOIRecord,
20
21
  AOICreate,
21
22
  DataRequest,
22
23
  DataRequestCreate,
@@ -54,9 +55,9 @@ class Client:
54
55
  res = self._get(url=f"/v0/aois/{id}")
55
56
  return AOI(**res)
56
57
 
57
- def list_aois(self) -> List[AOI]:
58
+ def list_aois(self) -> List[AOIRecord]:
58
59
  res = self._get(url="/v0/aois")
59
- return [AOI(**record) for record in res["records"]]
60
+ return [AOIRecord(**record) for record in res["records"]]
60
61
 
61
62
  def create_data_request(self, aoi_id: str, dataset_id: str) -> DataRequest:
62
63
  res = self._post(
cecil/models.py CHANGED
@@ -15,6 +15,15 @@ class AOI(BaseModel):
15
15
  created_by: str
16
16
 
17
17
 
18
+ class AOIRecord(BaseModel):
19
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
20
+ id: str
21
+ name: str
22
+ hectares: float
23
+ created_at: datetime.datetime
24
+ created_by: str
25
+
26
+
18
27
  class AOICreate(BaseModel):
19
28
  model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
20
29
  name: str
cecil/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.19"
1
+ __version__ = "0.0.20"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cecil
3
- Version: 0.0.19
3
+ Version: 0.0.20
4
4
  Summary: Python SDK for Cecil Earth
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE.txt
@@ -0,0 +1,9 @@
1
+ cecil/__init__.py,sha256=AEcRl73BDSAQe6W0d1PDD87IEcumARtREl7dCVa_YQY,86
2
+ cecil/client.py,sha256=mTmwI-p7fidDB4zv_D1S6M8cbms1NL90CifPV0tNF4k,7888
3
+ cecil/errors.py,sha256=ZNiSTYH2MgNZ7tNIgV07-Ge3KtmdncfzWiBi9yjURGs,1818
4
+ cecil/models.py,sha256=9RLtS5c3wHeu9jCqrL_XEc2POtubDY9RImkyDD4004A,3233
5
+ cecil/version.py,sha256=wQP0zPwrPeGkZ12uVa4mTM7oYoqji6PECSRd7QD_QXE,23
6
+ cecil-0.0.20.dist-info/METADATA,sha256=_ZP24-gkB3FmUSrbhEXQu6QuMBODzOa81ZcQG7WEimE,2659
7
+ cecil-0.0.20.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ cecil-0.0.20.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
9
+ cecil-0.0.20.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- cecil/__init__.py,sha256=AEcRl73BDSAQe6W0d1PDD87IEcumARtREl7dCVa_YQY,86
2
- cecil/client.py,sha256=XYfXnF2eydWIU0Gla4R4VEImlNoZP8t47-A2f4ym3B8,7861
3
- cecil/errors.py,sha256=ZNiSTYH2MgNZ7tNIgV07-Ge3KtmdncfzWiBi9yjURGs,1818
4
- cecil/models.py,sha256=7J-qnJWoPH_u9JQPWrGLOpAJU0uVD-FstPMF95KMuTk,3024
5
- cecil/version.py,sha256=AixLlU6Em9Z_zs4l1lTxAHg1b8pa8z3BTNKIHDkjBmo,23
6
- cecil-0.0.19.dist-info/METADATA,sha256=8o9ZKdTU_HSOdBtZADjHEXtTI6xZKZg8JKgxM_cyrbs,2659
7
- cecil-0.0.19.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- cecil-0.0.19.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
9
- cecil-0.0.19.dist-info/RECORD,,
File without changes