cecil 0.0.19__py3-none-any.whl → 0.0.21__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,17 +17,15 @@ from .errors import (
17
17
  )
18
18
  from .models import (
19
19
  AOI,
20
+ AOIRecord,
20
21
  AOICreate,
21
22
  DataRequest,
22
23
  DataRequestCreate,
23
- OrganisationCreate,
24
24
  OrganisationSettings,
25
25
  RecoverAPIKey,
26
26
  RecoverAPIKeyRequest,
27
27
  RotateAPIKey,
28
28
  RotateAPIKeyRequest,
29
- SignUpRequest,
30
- SignUpResponse,
31
29
  SnowflakeUserCredentials,
32
30
  Transformation,
33
31
  TransformationCreate,
@@ -54,9 +52,9 @@ class Client:
54
52
  res = self._get(url=f"/v0/aois/{id}")
55
53
  return AOI(**res)
56
54
 
57
- def list_aois(self) -> List[AOI]:
55
+ def list_aois(self) -> List[AOIRecord]:
58
56
  res = self._get(url="/v0/aois")
59
- return [AOI(**record) for record in res["records"]]
57
+ return [AOIRecord(**record) for record in res["records"]]
60
58
 
61
59
  def create_data_request(self, aoi_id: str, dataset_id: str) -> DataRequest:
62
60
  res = self._post(
@@ -128,20 +126,6 @@ class Client:
128
126
 
129
127
  return RotateAPIKey(**res)
130
128
 
131
- def sign_up(
132
- self, organisation: Dict[str, str], user: Dict[str, str]
133
- ) -> SignUpResponse:
134
- res = self._post(
135
- url="/v0/sign-up",
136
- model=SignUpRequest(
137
- organisation=OrganisationCreate(**organisation),
138
- user=UserCreate(**user),
139
- ),
140
- skip_auth=True,
141
- )
142
-
143
- return SignUpResponse(**res)
144
-
145
129
  def create_user(self, first_name: str, last_name: str, email: str) -> User:
146
130
  res = self._post(
147
131
  url="/v0/users",
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
@@ -36,11 +45,6 @@ class DataRequestCreate(BaseModel):
36
45
  dataset_id: str
37
46
 
38
47
 
39
- class OrganisationCreate(BaseModel):
40
- model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
41
- name: str
42
-
43
-
44
48
  class OrganisationSettings(BaseModel):
45
49
  model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
46
50
  monthly_data_request_limit: Optional[int] = None
@@ -104,14 +108,3 @@ class UserCreate(BaseModel):
104
108
  first_name: str
105
109
  last_name: str
106
110
  email: str
107
-
108
-
109
- class SignUpRequest(BaseModel):
110
- model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
111
- organisation: OrganisationCreate
112
- user: UserCreate
113
-
114
-
115
- class SignUpResponse(BaseModel):
116
- model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
117
- message: str
cecil/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.19"
1
+ __version__ = "0.0.21"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cecil
3
- Version: 0.0.19
3
+ Version: 0.0.21
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=TXcTdNUF8ER8gs8KQBzHIsoQPqDLj3npFeF0PWEi4EI,7430
3
+ cecil/errors.py,sha256=ZNiSTYH2MgNZ7tNIgV07-Ge3KtmdncfzWiBi9yjURGs,1818
4
+ cecil/models.py,sha256=GpW1pT9NBKS5y4Os0pW8UR3MO9kVJe1r8jOK-MjADLA,2799
5
+ cecil/version.py,sha256=PsqtE_T084MVsMv47JyTQ3DK2CRZJ3Kd9Q_vnw02oZk,23
6
+ cecil-0.0.21.dist-info/METADATA,sha256=2Q9DsNWUMtimtqNDdDqbssyFGT33DgWaVjrYHrkLmrs,2659
7
+ cecil-0.0.21.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
+ cecil-0.0.21.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
9
+ cecil-0.0.21.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