Skip to main content

SuiteSpot Authentication

PyPI Downloads License

Introduction

This package is a light wrapper for the SuiteSpot authentication API to provide easy creation of an access token. This token is required as part of Bearer Authorization in all calls to SuiteSpot's analytics API.

Installation

$ pip install suitespotauth

or

$ python -m pip install suitespotauth

Configuration

This package relies on your SuiteSpot username and password, since SuiteSpot's authentication API uses them in creating Basic Authorization for the initial authentication flow request. The username and password can be securely stored either on your computer or in a cloud provider.

Local environment

If you are running the package locally, you can store your SuiteSpot credentials on your computer (macOS Keychain or Windows Credential Locker). This is built on top of keyring.

Run the following command to set your local SuiteSpot credentials:

$ suitespotauth-configure

Cloud environment

You can also store your SuiteSpot credentials in a cloud provider secret manager. This helps for cloud environments (e.g., Lambda) where you can't use local secret storage. (Of course, you may choose to store your SuiteSpot credentials in a cloud provider even if you are running locally.)

See the Cloud configuration section for the syntax used for cloud credential storage.

Usage

from suitespotauth import SuiteSpotAuth
from suitespotauth import LocalCredentialStorage  # Or a cloud option

my_credentials = LocalCredentialStorage()

auth = SuiteSpotAuth(
    credential_storage=my_credentials,
    api_token_name="Custom SuiteSpot API token name"  # Optional
)

access_token = auth.access_token

headers = {
    "Authorization": f"Bearer {access_token}"
}

Cloud configuration

AWS

suitespotauth supports using AWS Parameter Store (SSM) to retrieve SuiteSpot credentials. You must have IAM permissions for your runtime (e.g., Lambda) to access the parameters. Instructions for IAM permissions are beyond the scope of this readme.

Set two SSM parameters, username and password, named anything you want. Choose SecureString type when creating the parameters. Then, provide the paths to these parameters when creating the AWSCredentialStorage object.

Install the AWS dependencies:

$ pip install 'suitespotauth[aws]'
from suitespotauth import AWSCredentialStorage

my_credentials = AWSCredentialStorage(
    username_path="/path/to/suitespot/username/in/ssm",
    password_path="/path/to/suitespot/password/in/ssm"
)

GCP

suitespotauth supports using GCP Secret Manager to retrieve SuiteSpot credentials. Set two secrets, username and password, named anything you want. Then, provide the Project ID and the paths to these two secrets when creating the GCPCredentialStorage object.

Install the GCP dependencies:

$ pip install 'suitespotauth[gcp]'
from suitespotauth import GCPCredentialStorage

my_credentials = GCPCredentialStorage(
    project_id="my-gcp-project-id",
    username_secret_id="suitespot-username-secret-id",
    password_secret_id="suitespot-password-secret-id"
)

Azure

suitespotauth supports using Azure Key Vault to retrieve SuiteSpot credentials. Set two secrets, username and password, named anything you want. Then, provide the Vault URL and the names of these two secrets when creating the AzureCredentialStorage object.

Install the Azure dependencies:

$ pip install 'suitespotauth[azure]'
from suitespotauth import AzureCredentialStorage

my_credentials = AzureCredentialStorage(
    vault_url="https://my.azure.keyvault.url",
    username_secret_name="suitespot-username-secret-name",
    password_secret_name="suitespot-password-secret-name"
)

Disclaimer

  • This is an unofficial package and is not affiliated with SuiteSpot. The official SuiteSpot authentication API docs can be found at: https://auth.suitespot.io/api
  • The SuiteSpot authentication API may change at any time, which can cause breaking changes to this package. Please open an issue on GitHub if you notice such problems

Metadata

Release files for suitespotauth 0.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for suitespotauth 0.3.5
File Size Uploaded Provenance Actions
suitespotauth-0.3.5.tar.gz 8.0 kB Without provenance Details for suitespotauth-0.3.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for suitespotauth 0.3.5
File Interpreter ABI Platform Actions
suitespotauth-0.3.5-py3-none-any.whl Python 3 none any Details for suitespotauth-0.3.5-py3-none-any.whl

Total release size: 15.6 kB

Release files / suitespotauth-0.3.5.tar.gz

Download URL suitespotauth-0.3.5.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
efe8cbba30e04d70783ff8b3c17bd56a3849b133e29f03bbeb5b4607f64c7765
BLAKE2b-256 checksum
How to use checksums
860b12830df914a1c85f41f17455f118a659c3ee3989412133e26a36ff21ac80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Release files / suitespotauth-0.3.5-py3-none-any.whl

Download URL suitespotauth-0.3.5-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2cad17811f7e29d725df2f2cc8a2ee1ae4e9c104955613619be5c31fbb86a867
BLAKE2b-256 checksum
How to use checksums
e312bf6a4d938f49c0cbda8211af18aacdb50f3960db995b46624b8c7202a8de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.1

Security for suitespotauth 0.3.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page