cecil 0.0.18__py3-none-any.whl → 0.0.19__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
@@ -21,6 +21,7 @@ from .models import (
21
21
  DataRequest,
22
22
  DataRequestCreate,
23
23
  OrganisationCreate,
24
+ OrganisationSettings,
24
25
  RecoverAPIKey,
25
26
  RecoverAPIKeyRequest,
26
27
  RotateAPIKey,
@@ -160,6 +161,23 @@ class Client:
160
161
  res = self._get(url="/v0/users")
161
162
  return [User(**record) for record in res["records"]]
162
163
 
164
+ def get_organisation_settings(self) -> OrganisationSettings:
165
+ res = self._get(url="/v0/organisation/settings")
166
+ return OrganisationSettings(**res)
167
+
168
+ def update_organisation_settings(
169
+ self,
170
+ *,
171
+ monthly_data_request_limit,
172
+ ) -> OrganisationSettings:
173
+ res = self._post(
174
+ url="/v0/organisation/settings",
175
+ model=OrganisationSettings(
176
+ monthly_data_request_limit=monthly_data_request_limit,
177
+ ),
178
+ )
179
+ return OrganisationSettings(**res)
180
+
163
181
  def _request(self, method: str, url: str, skip_auth=False, **kwargs) -> Dict:
164
182
 
165
183
  if skip_auth is False:
cecil/models.py CHANGED
@@ -1,5 +1,5 @@
1
1
  import datetime
2
- from typing import Dict
2
+ from typing import Dict, Optional
3
3
 
4
4
  from pydantic import BaseModel, ConfigDict, SecretStr
5
5
  from pydantic.alias_generators import to_camel
@@ -41,6 +41,11 @@ class OrganisationCreate(BaseModel):
41
41
  name: str
42
42
 
43
43
 
44
+ class OrganisationSettings(BaseModel):
45
+ model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
46
+ monthly_data_request_limit: Optional[int] = None
47
+
48
+
44
49
  class RecoverAPIKey(BaseModel):
45
50
  model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
46
51
  message: str
cecil/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.0.18"
1
+ __version__ = "0.0.19"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cecil
3
- Version: 0.0.18
3
+ Version: 0.0.19
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=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,,
@@ -1,9 +0,0 @@
1
- cecil/__init__.py,sha256=AEcRl73BDSAQe6W0d1PDD87IEcumARtREl7dCVa_YQY,86
2
- cecil/client.py,sha256=S6j7jwDdp02eFB3c3IlQ2b6h3qaVb7UCUR7Dh_wr66o,7288
3
- cecil/errors.py,sha256=ZNiSTYH2MgNZ7tNIgV07-Ge3KtmdncfzWiBi9yjURGs,1818
4
- cecil/models.py,sha256=BjSJlcRBSuJjUoTHa4y-2i-9dIGct9giLvg7DQPgerQ,2841
5
- cecil/version.py,sha256=qgKF-lRlzaBqf95e1sodHCZkSUCbz7ECKSeYHwXfAvI,23
6
- cecil-0.0.18.dist-info/METADATA,sha256=vrVGp0w4-sX9iz5wwW1eEGLkdHK6ciqrpZ8-YjoRl_w,2659
7
- cecil-0.0.18.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
8
- cecil-0.0.18.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
9
- cecil-0.0.18.dist-info/RECORD,,
File without changes