cecil 0.0.13__py3-none-any.whl → 0.0.14__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,7 +21,7 @@ from .models import (
|
|
|
21
21
|
)
|
|
22
22
|
|
|
23
23
|
# TODO: find a way to get this version from __about__.py
|
|
24
|
-
SDK_VERSION = "0.0.
|
|
24
|
+
SDK_VERSION = "0.0.14"
|
|
25
25
|
|
|
26
26
|
# TODO: Documentation (Google style)
|
|
27
27
|
# TODO: Add HTTP retries
|
|
@@ -106,6 +106,7 @@ class Client:
|
|
|
106
106
|
res = self._post(
|
|
107
107
|
url=f"/v0/recover-api-key",
|
|
108
108
|
model=RecoverAPIKeyRequest(email=email),
|
|
109
|
+
skip_auth=True,
|
|
109
110
|
)
|
|
110
111
|
|
|
111
112
|
return RecoverAPIKey(**res)
|
|
@@ -115,9 +116,10 @@ class Client:
|
|
|
115
116
|
|
|
116
117
|
return RotateAPIKey(**res)
|
|
117
118
|
|
|
118
|
-
def _request(self, method: str, url: str, **kwargs) -> Dict:
|
|
119
|
+
def _request(self, method: str, url: str, skip_auth=False, **kwargs) -> Dict:
|
|
119
120
|
|
|
120
|
-
|
|
121
|
+
if skip_auth is False:
|
|
122
|
+
self._set_auth()
|
|
121
123
|
|
|
122
124
|
headers = {"cecil-python-sdk-version": SDK_VERSION}
|
|
123
125
|
|
|
@@ -145,9 +147,13 @@ class Client:
|
|
|
145
147
|
def _get(self, url: str, **kwargs) -> Dict:
|
|
146
148
|
return self._request(method="get", url=url, **kwargs)
|
|
147
149
|
|
|
148
|
-
def _post(self, url: str, model: BaseModel, **kwargs) -> Dict:
|
|
150
|
+
def _post(self, url: str, model: BaseModel, skip_auth=False, **kwargs) -> Dict:
|
|
149
151
|
return self._request(
|
|
150
|
-
method="post",
|
|
152
|
+
method="post",
|
|
153
|
+
url=url,
|
|
154
|
+
json=model.model_dump(by_alias=True),
|
|
155
|
+
skip_auth=skip_auth,
|
|
156
|
+
**kwargs,
|
|
151
157
|
)
|
|
152
158
|
|
|
153
159
|
def _set_auth(self) -> None:
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
cecil/__init__.py,sha256=MF64bwUCd4sm3dvcxZnkb4ujHtxT_KeuXdD0nVieEt4,27
|
|
2
|
+
cecil/client.py,sha256=86TRdEGdxgO5nmoKpxdIIU6xeR9EjcOht7ZcKg7tInI,5237
|
|
3
|
+
cecil/models.py,sha256=6p9AedCDdkK-ptK2r5pc9AKG8rgZHw-YYDvRgXPAQqI,2544
|
|
4
|
+
cecil-0.0.14.dist-info/METADATA,sha256=xzTRj3FnDLmzk9pA11-YI3xBMMGKJ7p1e6rZlxO4YVw,2677
|
|
5
|
+
cecil-0.0.14.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
6
|
+
cecil-0.0.14.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
|
|
7
|
+
cecil-0.0.14.dist-info/RECORD,,
|
cecil-0.0.13.dist-info/RECORD
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
cecil/__init__.py,sha256=MF64bwUCd4sm3dvcxZnkb4ujHtxT_KeuXdD0nVieEt4,27
|
|
2
|
-
cecil/client.py,sha256=wgEYWuTZeJv81oiCoNU0rUrDlwnXI1sQFiLLa51BvyI,5070
|
|
3
|
-
cecil/models.py,sha256=6p9AedCDdkK-ptK2r5pc9AKG8rgZHw-YYDvRgXPAQqI,2544
|
|
4
|
-
cecil-0.0.13.dist-info/METADATA,sha256=6Py3ar6ZlMOwaX3zo4TScat1uvcZk2jSECFc8CXmBZM,2677
|
|
5
|
-
cecil-0.0.13.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
6
|
-
cecil-0.0.13.dist-info/licenses/LICENSE.txt,sha256=mUexcmfYx3bG1VIzAdQTOf_NzStYw6-QkKVdUY_d4i4,1066
|
|
7
|
-
cecil-0.0.13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|