terrakio-admin-api 0.3.6__py3-none-any.whl → 0.3.7__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.

@@ -5,7 +5,7 @@ Terrakio Admin API Client
5
5
  An admin API client for Terrakio.
6
6
  """
7
7
 
8
- __version__ = "0.3.4"
8
+ __version__ = "0.3.7"
9
9
 
10
10
  from terrakio_core import AsyncClient as CoreAsyncClient
11
11
  from terrakio_core import SyncClient as CoreSyncClient
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: terrakio-admin-api
3
- Version: 0.3.6
3
+ Version: 0.3.7
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,9 @@ 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.6
18
+ Requires-Dist: terrakio-core==0.3.7
19
+ Provides-Extra: ml
20
+ Requires-Dist: terrakio-core[ml]==0.3.7; extra == "ml"
19
21
 
20
22
  # Terrakio Admin API Client
21
23
 
@@ -40,24 +42,24 @@ pip install terrakio-admin-api
40
42
  from terrakio_admin_api import Client
41
43
 
42
44
  # Initialize the admin client, default url is https://api.terrak.io
43
- admin_client = Client()
45
+ admin_client = Client(url = "https://dev-au.terrak.io")
44
46
 
45
47
  # Login to your admin account
46
- token = admin_client.login(email = "XXX", password = "XXX")
48
+ token = admin_client.auth.login(email = "XXX", password = "XXX")
47
49
  print(f"✓ Login successful, personal token: {token[:10]}...")
48
50
 
49
51
  # The login account will automatically be used for the requests
50
52
 
51
53
  # View API key
52
- api_key = admin_client.view_api_key()
54
+ api_key = admin_client.auth.view_api_key()
53
55
  print(f"✓ Current API key: {api_key[:10]}...")
54
56
 
55
57
  # List number of datasets
56
- datasets = admin_client.list_datasets()
58
+ datasets = admin_client.datasets.list_datasets()
57
59
  print(f"✓ Listed {len(datasets)} datasets")
58
60
 
59
61
  # List number of users
60
- users = admin_client.list_users()
62
+ users = admin_client.users.list_users()
61
63
  print(f"✓ Listed {len(users)} users")
62
64
  ```
63
65
 
@@ -0,0 +1,5 @@
1
+ terrakio_admin_api/__init__.py,sha256=uPyKunAahxAkT_592zx7mFDJ-EYF4jFGs52-oPtlDQM,781
2
+ terrakio_admin_api-0.3.7.dist-info/METADATA,sha256=n899A3f1EojBC1086O0rRvQNOGxU0mXdPHmB0siJ05U,2205
3
+ terrakio_admin_api-0.3.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
4
+ terrakio_admin_api-0.3.7.dist-info/top_level.txt,sha256=748j-dWRk6ZzvitoF8KKmeRij-jNohN1ESi8ePDz0os,19
5
+ terrakio_admin_api-0.3.7.dist-info/RECORD,,
@@ -1,5 +0,0 @@
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,,