Skip to main content

Python SDK for the Aspia Space REST API

Project description

AspiaSpace Python SDK

The official Python client for interacting with the Aspia APIs. This SDK handles authentication, response formatting, automatic retries, and robust error handling out of the box — so you can focus on working with your data rather than managing HTTP requests.

To get started, you'll need an Aspia account with a client ID and secret. Contact contact@aspiaspace.com to request a trial, or visit aspiaspace.com.

Key Features

  • Automatic authentication — handles token acquisition and renewal using your client ID and secret
  • Automatic retries — built-in retry logic for transient network and server errors
  • Response formatting — responses are returned in structured, user-friendly formats
  • Robust error handling — clear exceptions with actionable messages
  • Full endpoint coverage — supports the customer areas, Vigour, ALT, and weather endpoints

Requirements

Python Requirements

Python

This package requires Python 3.12 or higher.

System Requirements

macOS Linux Windows

This package is compatible with macOS, Linux, and Windows.

Installation

Install the SDK from PyPI using pip:

pip install aspiaspace

Quick Start

Construct an AspiaSpace instance with your credentials, then call any of the available service attributes to start making requests:

from aspiaspace import AspiaSpace

sdk = AspiaSpace(
    client_id="your-client-id",
    client_secret="your-client-secret",
)

# List all customers
customers = sdk.customers.list()

We recommend storing your credentials in environment variables rather than hardcoding them:

import os
from aspiaspace import AspiaSpace

sdk = AspiaSpace(
    client_id=os.environ["ASPIA_CLIENT_ID"],
    client_secret=os.environ["ASPIA_CLIENT_SECRET"],
)

Authentication

All requests are authenticated using your client ID and client secret, which are issued when you register with Aspia. The SDK handles token acquisition and renewal automatically — you only need to provide your credentials once when constructing the client.

If you do not yet have credentials, contact contact@aspiaspace.com or visit aspiaspace.com to request a trial.

Available Services

Attribute Description
sdk.customers Manage and retrieve customer area data
sdk.vigour Access Vigour endpoint data
sdk.alt Access ALT endpoint data
sdk.weather Retrieve weather data
sdk.config View and manage SDK configuration

Full API reference documentation is available at api.aspiaspace.com/v1/docs.

Error Handling

The SDK raises descriptive exceptions to help you handle failures gracefully:

from aspiaspace import AspiaSpace
from aspiaspace.exceptions import AspiaAuthError, AspiaAPIError

sdk = AspiaSpace(
    client_id=os.environ["ASPIA_CLIENT_ID"],
    client_secret=os.environ["ASPIA_CLIENT_SECRET"],
)

try:
    customers = sdk.customers.list()
except AspiaAuthError:
    print("Authentication failed — check your client ID and secret.")
except AspiaAPIError as e:
    print(f"API error: {e}")

Support

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.1.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.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aspiaspace-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 da7a29733c1a235f9e6b3c6d202c5986779797277e71046ab9dab16bf9c624ff
MD5 71965089100e5c06aef6532b4bcaf5be
BLAKE2b-256 6b34b16b0dde407457eae15f6fae903ce1a2695d4ea20461ee616c073fccb01c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aspiaspace-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: aspiaspace-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ce31ba0d45948b94fac223ce539617e303c54ba9528001f46e84bd5d4e2a781a
MD5 1edbc86ea3fa9aef1649f5d0f58e0452
BLAKE2b-256 d22a0ce6807b4527e0064db434d57e49ea28db90069a6ea873f05bf3ee545997

See more details on using hashes here.

Provenance

The following attestation bundles were made for aspiaspace-0.1.1-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