Metadata-Version: 2.4
Name: aspia-space-sdk
Version: 0.1.0
Summary: Python SDK for the Aspia Space REST API
Author-email: Aspia Space <contact@aspiaspace.com>
License: Proprietary
Project-URL: Homepage, https://github.com/aspiaspace/Aspia-Space-SDK-Python/
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.28
Dynamic: license-file

﻿# Aspia Space SDK (Python)
A lightweight Python SDK for interacting with the **Aspia Space RESTful API**, including OAuth 2.0 authentication.

## Features
- OAuth 2.0 (Client Credentials)
- Automatic token handling
- Clean, service-based API (areas, customers, etc.)
- GeoJSON support for spatial endpoints
- Configurable logging
- Pythonic, dependency-light design

## Requirements
- Python 3.10+
- requests

## Install using PIP
1. Copy the `dist` folder in to the root of your project.
1. run the following python command `pip install .\dist\aspia_space_sdk-0.1.0-py3-none-any.whl`

## Authentication

The SDK uses **OAuth 2.0 Client Credentials**.

You will need:
- CLIENT_ID
- CLIENT_SECRET

## Usage
### Initialisation

```python
from aspiaspace import AspiaSpace

aspia = AspiaSpace(
    client_id=CLIENT_ID,
    client_secret=CLIENT_SECRET,
)
```

### Areas
#### all()
Get all areas -> Array of GeoJSON containing Aspia references.

```python
aspia.areas.all()
```

#### vigour("yyyy-mm-dd")
Get the average NVDI, GCVI and NDWI for all areas on a specific date ->  

```python
aspia.areas.vigour("yyyy-mm-dd")
```

### Products
#### alt()
Get all Aspia Land Tokens for a given date for a specific area -> returns a CSV (H3 id, NDVI, GCVI, NDWI, Date).

```python
aspia.products.alt("uuid", "yyyy-mm-dd")
```

### Config
Allows for configuration updates after the SDK is initialised.

#### update_customer_credentials()
Update the customers Client Id, Client Secret, Scope 

```python
aspia.config.update_customer_credentials(
    client_id="UPDATE Client_id",
    client_secret="UPDATE Secret",
    scope="UPDATE scope"
)
```

#### update_api_details()
Update the api details: Oauth url, API request url, timeout.

```python
aspia.config.update_api_details(
    token_url="UPDATE token url",
    request_url="UPDATE request url",
    timeout=10
)
```
