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
- Copy the
distfolder in to the root of your project. - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25c77020bd5eccb24310c5adb954c5db11ddeef60ecc82eb6168f0bfc4c6e067
|
|
| MD5 |
4512c699a220fd9feb16a0caa7c38164
|
|
| BLAKE2b-256 |
8b8a996e90c63fae5558121f9dcfc208e2b5abe130c9de17b1b7dcdc3455b229
|
Provenance
The following attestation bundles were made for aspiaspace-0.1.0.tar.gz:
Publisher:
publish.yml on aspiaspace/Aspia-Space-SDK-Python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aspiaspace-0.1.0.tar.gz -
Subject digest:
25c77020bd5eccb24310c5adb954c5db11ddeef60ecc82eb6168f0bfc4c6e067 - Sigstore transparency entry: 1859737184
- Sigstore integration time:
-
Permalink:
aspiaspace/Aspia-Space-SDK-Python@7f020dbc49f4bf046109190f8dcb5d8abc5ba453 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aspiaspace
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7f020dbc49f4bf046109190f8dcb5d8abc5ba453 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d26b640362cd8922b6acf958501365a1b7842d3d388a1d8429957078c7113538
|
|
| MD5 |
bb384f7d9c23a2f6d141c4862332fd70
|
|
| BLAKE2b-256 |
3b9b6bc6bc1e0a688dd445776f48bdfe0b86273ff684d73b1e240bbbf86a20a8
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
aspiaspace-0.1.0-py3-none-any.whl -
Subject digest:
d26b640362cd8922b6acf958501365a1b7842d3d388a1d8429957078c7113538 - Sigstore transparency entry: 1859737197
- Sigstore integration time:
-
Permalink:
aspiaspace/Aspia-Space-SDK-Python@7f020dbc49f4bf046109190f8dcb5d8abc5ba453 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/aspiaspace
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7f020dbc49f4bf046109190f8dcb5d8abc5ba453 -
Trigger Event:
release
-
Statement type: