Metadata-Version: 2.4
Name: terrakio-admin-api
Version: 0.4.6
Summary: Admin API client for Terrakio services
Author-email: Yupeng Chao <yupeng@haizea.com.au>
Project-URL: Homepage, https://github.com/HaizeaAnalytics/terrakio-python-api
Project-URL: Bug Tracker, https://github.com/HaizeaAnalytics/terrakio-python-api/issues
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Requires-Python: >3.11
Description-Content-Type: text/markdown
Requires-Dist: terrakio-core==0.4.6
Provides-Extra: ml
Requires-Dist: terrakio-core[ml]==0.4.6; extra == "ml"

# Terrakio Admin API Client

Administrative API client for Terrakio services. This package extends the regular Terrakio API client with additional administrative capabilities.

## Features

- All features from the regular API client
- User management (create, view, edit, delete users)
- Dataset management (create, edit, update, delete datasets)
- Mass stats functionality (create pyramid)

## Installation

```bash
pip install terrakio-admin-api
```

## Usage Example

```python
from terrakio_admin_api import Client

# Initialize the admin client, default url is https://api.terrak.io
admin_client = Client(url = "https://dev-au.terrak.io")

# Login to your admin account
token = admin_client.auth.login(email = "XXX", password = "XXX")
print(f"✓ Login successful, personal token: {token[:10]}...")

# The login account will automatically be used for the requests

# View API key
api_key = admin_client.auth.view_api_key()
print(f"✓ Current API key: {api_key[:10]}...")

# List number of datasets
datasets = admin_client.datasets.list_datasets()
print(f"✓ Listed {len(datasets)} datasets")

# List number of users
users = admin_client.users.list_users()
print(f"✓ Listed {len(users)} users")
```

For more documentation, see the [main repository](https://github.com/HaizeaAnalytics/terrakio-python-api). 
