terrakio-admin-api 0.2.1__py3-none-any.whl → 0.2.3__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-0.2.1.dist-info → terrakio_admin_api-0.2.3.dist-info}/METADATA +8 -9
- terrakio_admin_api-0.2.3.dist-info/RECORD +4 -0
- {terrakio_admin_api-0.2.1.dist-info → terrakio_admin_api-0.2.3.dist-info}/WHEEL +1 -1
- terrakio_admin_api-0.2.3.dist-info/top_level.txt +1 -0
- terrakio_admin_api/__init__.py +0 -53
- terrakio_admin_api-0.2.1.dist-info/RECORD +0 -5
- terrakio_admin_api-0.2.1.dist-info/top_level.txt +0 -1
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: terrakio-admin-api
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: Admin API client for Terrakio services
|
|
5
|
-
Home-page: https://github.com/HaizeaAnalytics/terrakio-python-api
|
|
6
|
-
Author: Yupeng Chao
|
|
7
5
|
Author-email: Yupeng Chao <yupeng@haizea.com.au>
|
|
8
6
|
Project-URL: Homepage, https://github.com/HaizeaAnalytics/terrakio-python-api
|
|
9
7
|
Project-URL: Bug Tracker, https://github.com/HaizeaAnalytics/terrakio-python-api/issues
|
|
@@ -15,12 +13,9 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
15
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
14
|
Classifier: Operating System :: OS Independent
|
|
17
15
|
Classifier: Development Status :: 4 - Beta
|
|
18
|
-
Requires-Python:
|
|
16
|
+
Requires-Python: >3.11
|
|
19
17
|
Description-Content-Type: text/markdown
|
|
20
|
-
Requires-Dist: terrakio-core
|
|
21
|
-
Dynamic: author
|
|
22
|
-
Dynamic: home-page
|
|
23
|
-
Dynamic: requires-python
|
|
18
|
+
Requires-Dist: terrakio-core==0.2.3
|
|
24
19
|
|
|
25
20
|
# Terrakio Admin API Client
|
|
26
21
|
|
|
@@ -57,9 +52,13 @@ print(f"✓ Login successful, personal token: {token[:10]}...")
|
|
|
57
52
|
api_key = admin_client.view_api_key()
|
|
58
53
|
print(f"✓ Current API key: {api_key[:10]}...")
|
|
59
54
|
|
|
60
|
-
#
|
|
55
|
+
# List number of datasets
|
|
61
56
|
datasets = admin_client.list_datasets()
|
|
62
57
|
print(f"✓ Listed {len(datasets)} datasets")
|
|
58
|
+
|
|
59
|
+
# List number of users
|
|
60
|
+
users = admin_client.list_users()
|
|
61
|
+
print(f"✓ Listed {len(users)} users")
|
|
63
62
|
```
|
|
64
63
|
|
|
65
64
|
For more documentation, see the [main repository](https://github.com/HaizeaAnalytics/terrakio-python-api).
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
terrakio_admin_api-0.2.3.dist-info/METADATA,sha256=l8MMHjRhJp2WDsGQRJJdCDIr36d6vPossT3boAVtWHk,2074
|
|
2
|
+
terrakio_admin_api-0.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
3
|
+
terrakio_admin_api-0.2.3.dist-info/top_level.txt,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
4
|
+
terrakio_admin_api-0.2.3.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
terrakio_admin_api/__init__.py
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Terrakio Admin API Client
|
|
3
|
-
|
|
4
|
-
A Python client for administrators to access Terrakio's administrative API.
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
__version__ = "0.1.0"
|
|
8
|
-
|
|
9
|
-
from terrakio_core.client import BaseClient
|
|
10
|
-
|
|
11
|
-
class Client(BaseClient):
|
|
12
|
-
# Expose admin methods as public
|
|
13
|
-
def get_user_by_id(self, user_id: str):
|
|
14
|
-
return self._get_user_by_id(user_id)
|
|
15
|
-
|
|
16
|
-
def get_user_by_email(self, email: str):
|
|
17
|
-
return self._get_user_by_email(email)
|
|
18
|
-
|
|
19
|
-
def list_users(self, substring: str = None, uid: bool = False):
|
|
20
|
-
return self._list_users(substring, uid)
|
|
21
|
-
|
|
22
|
-
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):
|
|
23
|
-
return self._edit_user(user_id, uid, email, role, apiKey, groups, quota)
|
|
24
|
-
|
|
25
|
-
def reset_quota(self, email: str, quota: int = None):
|
|
26
|
-
return self._reset_quota(email, quota)
|
|
27
|
-
|
|
28
|
-
def delete_user(self, uid: str):
|
|
29
|
-
return self._delete_user(uid)
|
|
30
|
-
|
|
31
|
-
# Expose dataset management methods as public
|
|
32
|
-
def get_dataset(self, name: str, collection: str = "terrakio-datasets"):
|
|
33
|
-
return self._get_dataset(name, collection)
|
|
34
|
-
|
|
35
|
-
def list_datasets(self, substring: str = None, collection: str = "terrakio-datasets"):
|
|
36
|
-
return self._list_datasets(substring, collection)
|
|
37
|
-
|
|
38
|
-
def create_dataset(self, name: str, collection: str = "terrakio-datasets", **kwargs):
|
|
39
|
-
return self._create_dataset(name, collection, **kwargs)
|
|
40
|
-
|
|
41
|
-
def update_dataset(self, name: str, append: bool = True, collection: str = "terrakio-datasets", **kwargs):
|
|
42
|
-
return self._update_dataset(name, append, collection, **kwargs)
|
|
43
|
-
|
|
44
|
-
def overwrite_dataset(self, name: str, collection: str = "terrakio-datasets", **kwargs):
|
|
45
|
-
return self._overwrite_dataset(name, collection, **kwargs)
|
|
46
|
-
|
|
47
|
-
def delete_dataset(self, name: str, collection: str = "terrakio-datasets"):
|
|
48
|
-
return self._delete_dataset(name, collection)
|
|
49
|
-
|
|
50
|
-
__all__ = [
|
|
51
|
-
'Client'
|
|
52
|
-
]
|
|
53
|
-
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
terrakio_admin_api/__init__.py,sha256=1fHirGmEFfLi19GEowKqYVF4Sh9oXqQ_1XxGUH5zxA0,1978
|
|
2
|
-
terrakio_admin_api-0.2.1.dist-info/METADATA,sha256=z5RaTeuU-24r21-mUqyD9MNmDRj3valsLoRoNLiaN-o,2119
|
|
3
|
-
terrakio_admin_api-0.2.1.dist-info/WHEEL,sha256=QZxptf4Y1BKFRCEDxD4h2V0mBFQOVFLFEpvxHmIs52A,91
|
|
4
|
-
terrakio_admin_api-0.2.1.dist-info/top_level.txt,sha256=748j-dWRk6ZzvitoF8KKmeRij-jNohN1ESi8ePDz0os,19
|
|
5
|
-
terrakio_admin_api-0.2.1.dist-info/RECORD,,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
terrakio_admin_api
|