Skip to main content

Python SDK for the Aspia Space REST API

Project description

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.
  2. 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

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.

aspia.areas.all()

vigour("yyyy-mm-dd")

Get the average NVDI, GCVI and NDWI for all areas on a specific date ->

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).

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

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aspiaspace-0.1.0.tar.gz (1.3 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aspiaspace-0.1.0-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

File details

Details for the file aspiaspace-0.1.0.tar.gz.

File metadata

  • Download URL: aspiaspace-0.1.0.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aspiaspace-0.1.0.tar.gz
Algorithm Hash digest
SHA256 25c77020bd5eccb24310c5adb954c5db11ddeef60ecc82eb6168f0bfc4c6e067
MD5 4512c699a220fd9feb16a0caa7c38164
BLAKE2b-256 8b8a996e90c63fae5558121f9dcfc208e2b5abe130c9de17b1b7dcdc3455b229

See more details on using hashes here.

Provenance

The following attestation bundles were made for aspiaspace-0.1.0.tar.gz:

Publisher: publish.yml on aspiaspace/Aspia-Space-SDK-Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aspiaspace-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aspiaspace-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aspiaspace-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d26b640362cd8922b6acf958501365a1b7842d3d388a1d8429957078c7113538
MD5 bb384f7d9c23a2f6d141c4862332fd70
BLAKE2b-256 3b9b6bc6bc1e0a688dd445776f48bdfe0b86273ff684d73b1e240bbbf86a20a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for aspiaspace-0.1.0-py3-none-any.whl:

Publisher: publish.yml on aspiaspace/Aspia-Space-SDK-Python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page