terrakio-admin-api 0.3.3__py3-none-any.whl → 0.3.6__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 terrakio-admin-api might be problematic. Click here for more details.
- terrakio_admin_api/__init__.py +14 -41
- {terrakio_admin_api-0.3.3.dist-info → terrakio_admin_api-0.3.6.dist-info}/METADATA +2 -2
- terrakio_admin_api-0.3.6.dist-info/RECORD +5 -0
- terrakio_admin_api-0.3.3.dist-info/RECORD +0 -5
- {terrakio_admin_api-0.3.3.dist-info → terrakio_admin_api-0.3.6.dist-info}/WHEEL +0 -0
- {terrakio_admin_api-0.3.3.dist-info → terrakio_admin_api-0.3.6.dist-info}/top_level.txt +0 -0
terrakio_admin_api/__init__.py
CHANGED
|
@@ -2,52 +2,25 @@
|
|
|
2
2
|
"""
|
|
3
3
|
Terrakio Admin API Client
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
An admin API client for Terrakio.
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
__version__ = "0.3.
|
|
8
|
+
__version__ = "0.3.4"
|
|
9
9
|
|
|
10
|
-
from terrakio_core
|
|
10
|
+
from terrakio_core import AsyncClient as CoreAsyncClient
|
|
11
|
+
from terrakio_core import SyncClient as CoreSyncClient
|
|
12
|
+
from terrakio_core.endpoints.group_management import AdminGroupManagement
|
|
11
13
|
|
|
12
|
-
class
|
|
14
|
+
class AsyncClient(CoreAsyncClient):
|
|
13
15
|
def __init__(self, *args, **kwargs):
|
|
14
16
|
super().__init__(*args, **kwargs)
|
|
15
|
-
self.
|
|
16
|
-
|
|
17
|
-
def get_user_by_id(self, user_id: str):
|
|
18
|
-
return self._get_user_by_id(user_id)
|
|
19
|
-
|
|
20
|
-
def get_user_by_email(self, email: str):
|
|
21
|
-
return self._get_user_by_email(email)
|
|
22
|
-
|
|
23
|
-
def list_users(self, substring: str = None, uid: bool = False):
|
|
24
|
-
return self._list_users(substring, uid)
|
|
25
|
-
|
|
26
|
-
def edit_user(self, user_id: str, uid: str = None, email: str = None, role: str = None, apiKey: str = None, groups: list = None, quota: int = None):
|
|
27
|
-
return self._edit_user(user_id, uid, email, role, apiKey, groups, quota)
|
|
28
|
-
|
|
29
|
-
def reset_quota(self, email: str, quota: int = None):
|
|
30
|
-
return self._reset_quota(email, quota)
|
|
31
|
-
|
|
32
|
-
def delete_user(self, uid: str):
|
|
33
|
-
return self._delete_user(uid)
|
|
34
|
-
|
|
35
|
-
def get_dataset(self, name: str, collection: str = "terrakio-datasets"):
|
|
36
|
-
return self._get_dataset(name, collection)
|
|
17
|
+
self.groups = AdminGroupManagement(self)
|
|
37
18
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
def update_dataset(self, name: str, append: bool = True, collection: str = "terrakio-datasets", **kwargs):
|
|
45
|
-
return self._update_dataset(name, append, collection, **kwargs)
|
|
46
|
-
|
|
47
|
-
def overwrite_dataset(self, name: str, collection: str = "terrakio-datasets", **kwargs):
|
|
48
|
-
return self._overwrite_dataset(name, collection, **kwargs)
|
|
49
|
-
|
|
50
|
-
def delete_dataset(self, name: str, collection: str = "terrakio-datasets"):
|
|
51
|
-
return self._delete_dataset(name, collection)
|
|
19
|
+
class SyncClient(CoreSyncClient):
|
|
20
|
+
"""Synchronous version of the Terrakio Admin API client with full admin permissions."""
|
|
21
|
+
|
|
22
|
+
def __init__(self, *args, **kwargs):
|
|
23
|
+
super().__init__(*args, **kwargs)
|
|
24
|
+
self.groups = AdminGroupManagement(self)
|
|
52
25
|
|
|
53
|
-
__all__ = ['
|
|
26
|
+
__all__ = ['AsyncClient', 'SyncClient']
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: terrakio-admin-api
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.6
|
|
4
4
|
Summary: Admin API client for Terrakio services
|
|
5
5
|
Author-email: Yupeng Chao <yupeng@haizea.com.au>
|
|
6
6
|
Project-URL: Homepage, https://github.com/HaizeaAnalytics/terrakio-python-api
|
|
@@ -15,7 +15,7 @@ Classifier: Operating System :: OS Independent
|
|
|
15
15
|
Classifier: Development Status :: 4 - Beta
|
|
16
16
|
Requires-Python: >3.11
|
|
17
17
|
Description-Content-Type: text/markdown
|
|
18
|
-
Requires-Dist: terrakio-core==0.3.
|
|
18
|
+
Requires-Dist: terrakio-core==0.3.6
|
|
19
19
|
|
|
20
20
|
# Terrakio Admin API Client
|
|
21
21
|
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
terrakio_admin_api/__init__.py,sha256=HEXanP5C97triic44kkcD0bc8R-LFs3_nEiqxs3lYSY,781
|
|
2
|
+
terrakio_admin_api-0.3.6.dist-info/METADATA,sha256=MBW60tzoOKMPlzFzTWuzzBT7duqaeN2jkLcI7Wuhry4,2074
|
|
3
|
+
terrakio_admin_api-0.3.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
+
terrakio_admin_api-0.3.6.dist-info/top_level.txt,sha256=748j-dWRk6ZzvitoF8KKmeRij-jNohN1ESi8ePDz0os,19
|
|
5
|
+
terrakio_admin_api-0.3.6.dist-info/RECORD,,
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
terrakio_admin_api/__init__.py,sha256=jj8jS0Xt4EbmZ-s3nfbz3ktCZvaLwadlzlw6PRPtPno,2004
|
|
2
|
-
terrakio_admin_api-0.3.3.dist-info/METADATA,sha256=8lwHmbaC3BV-vmMV1Kb4B_gLq4XUjIXkItL3ka9pdGI,2074
|
|
3
|
-
terrakio_admin_api-0.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
-
terrakio_admin_api-0.3.3.dist-info/top_level.txt,sha256=748j-dWRk6ZzvitoF8KKmeRij-jNohN1ESi8ePDz0os,19
|
|
5
|
-
terrakio_admin_api-0.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|