Metadata-Version: 2.4
Name: terrakio-api
Version: 0.2.7
Summary: A client library for Terrakio's WCS API service
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
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering
Requires-Python: >3.11
Description-Content-Type: text/markdown
Requires-Dist: terrakio-core==0.2.7
Requires-Dist: requests>=2.25.0
Requires-Dist: pyyaml>=5.1
Requires-Dist: xarray>=2023.1.0
Requires-Dist: netcdf4>=1.6.0
Requires-Dist: pandas>=1.5.0
Requires-Dist: numpy>=1.22.0
Requires-Dist: scipy>=1.8.0
Requires-Dist: shapely>=2.0.0

# Terrakio API Client

A Python client for Terrakio API. This package provides a user-friendly interface for accessing Terrakio's data services.

## Features

- Authentication
- WCS queries and data retrieval
- Mass stats related functionalities

## Installation

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

## Usage Example

```python
from terrakio_api import Client
from shapely.geometry import Point

# Initialize the client
client = Client()

# Login to your account
token = client.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 = client.view_api_key()
print(f"✓ Current API key: {api_key[:10]}...")

# Create a geographic feature
point = Point(149.057, -35.1548)
geojson = {
     "type": "Feature",
     "geometry": {
          "type": "Point",
          "coordinates": [point.x, point.y]
     },
     "properties": {
          "name": "Location in Canberra region",
          "description": "Coordinates: 149.057, -35.1548"
     }
}

# Make a WCS request
dataset = client.wcs(
     expr="prec=MSWX.precipitation@(year=2024, month=1)\nprec",
     feature=geojson,
     output="netcdf"
)
```

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