suitespotauth


Namesuitespotauth JSON
Version 0.3.5 PyPI version JSON
download
home_pageNone
SummaryEasy SuiteSpot authentication.
upload_time2024-03-25 18:28:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords authentication suitespot property management capex construction
VCS
bugtrack_url
requirements keyring requests boto3 botocore google-cloud-secret-manager google-api-core azure-identity azure-keyvault
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SuiteSpot Authentication

[![PyPI](https://img.shields.io/pypi/v/suitespotauth?color=blue&label=pypi)](https://pypi.org/project/suitespotauth/)
[![Downloads](https://img.shields.io/pepy/dt/suitespotauth?color=purple&label=downloads)](https://pypistats.org/packages/suitespotauth)
[![License](https://img.shields.io/badge/License-MIT-green.svg?color=dark-green&label=license)](https://opensource.org/blog/license/mit)

## 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
```shell
$ pip install suitespotauth
```
or
```shell
$ 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](https://github.com/jaraco/keyring). 

Run the following command to set your local SuiteSpot credentials:
```shell
$ 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](#cloud-configuration) section for the syntax used for cloud credential storage.

## Usage
```python
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:
```shell
$ pip install 'suitespotauth[aws]'
```

```python
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:
```shell
$ pip install 'suitespotauth[gcp]'
```

```python
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:
```shell
$ pip install 'suitespotauth[azure]'
```

```python
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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "suitespotauth",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "authentication, suitespot, property, management, capex, construction",
    "author": null,
    "author_email": "Yakir Havin <y.havin@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/86/0b/12830df914a1c85f41f17455f118a659c3ee3989412133e26a36ff21ac80/suitespotauth-0.3.5.tar.gz",
    "platform": null,
    "description": "# SuiteSpot Authentication\n\n[![PyPI](https://img.shields.io/pypi/v/suitespotauth?color=blue&label=pypi)](https://pypi.org/project/suitespotauth/)\n[![Downloads](https://img.shields.io/pepy/dt/suitespotauth?color=purple&label=downloads)](https://pypistats.org/packages/suitespotauth)\n[![License](https://img.shields.io/badge/License-MIT-green.svg?color=dark-green&label=license)](https://opensource.org/blog/license/mit)\n\n## Introduction\nThis 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.\n\n## Installation\n```shell\n$ pip install suitespotauth\n```\nor\n```shell\n$ python -m pip install suitespotauth\n```\n\n## Configuration\nThis 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.\n\n### Local environment\nIf 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](https://github.com/jaraco/keyring). \n\nRun the following command to set your local SuiteSpot credentials:\n```shell\n$ suitespotauth-configure\n```\n\n### Cloud environment\nYou 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.) \n\nSee the [Cloud configuration](#cloud-configuration) section for the syntax used for cloud credential storage.\n\n## Usage\n```python\nfrom suitespotauth import SuiteSpotAuth\nfrom suitespotauth import LocalCredentialStorage  # Or a cloud option\n\nmy_credentials = LocalCredentialStorage()\n\nauth = SuiteSpotAuth(\n    credential_storage=my_credentials,\n    api_token_name=\"Custom SuiteSpot API token name\"  # Optional\n)\n\naccess_token = auth.access_token\n\nheaders = {\n    \"Authorization\": f\"Bearer {access_token}\"\n}\n```\n\n## Cloud configuration\n### AWS\n`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.\n\nSet 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.\n\nInstall the AWS dependencies:\n```shell\n$ pip install 'suitespotauth[aws]'\n```\n\n```python\nfrom suitespotauth import AWSCredentialStorage\n\nmy_credentials = AWSCredentialStorage(\n    username_path=\"/path/to/suitespot/username/in/ssm\",\n    password_path=\"/path/to/suitespot/password/in/ssm\"\n)\n```\n\n### GCP\n`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. \n\nInstall the GCP dependencies:\n```shell\n$ pip install 'suitespotauth[gcp]'\n```\n\n```python\nfrom suitespotauth import GCPCredentialStorage\n\nmy_credentials = GCPCredentialStorage(\n    project_id=\"my-gcp-project-id\",\n    username_secret_id=\"suitespot-username-secret-id\",\n    password_secret_id=\"suitespot-password-secret-id\"\n)\n```\n\n### Azure\n`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. \n\nInstall the Azure dependencies:\n```shell\n$ pip install 'suitespotauth[azure]'\n```\n\n```python\nfrom suitespotauth import AzureCredentialStorage\n\nmy_credentials = AzureCredentialStorage(\n    vault_url=\"https://my.azure.keyvault.url\",\n    username_secret_name=\"suitespot-username-secret-name\",\n    password_secret_name=\"suitespot-password-secret-name\"\n)\n```\n\n## Disclaimer\n- 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\n- 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\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Easy SuiteSpot authentication.",
    "version": "0.3.5",
    "project_urls": {
        "Repository": "https://github.com/yhavin/suitespotauth"
    },
    "split_keywords": [
        "authentication",
        " suitespot",
        " property",
        " management",
        " capex",
        " construction"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e312bf6a4d938f49c0cbda8211af18aacdb50f3960db995b46624b8c7202a8de",
                "md5": "8c2fe8179153628d6c912d1a3abed2bd",
                "sha256": "2cad17811f7e29d725df2f2cc8a2ee1ae4e9c104955613619be5c31fbb86a867"
            },
            "downloads": -1,
            "filename": "suitespotauth-0.3.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8c2fe8179153628d6c912d1a3abed2bd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 7614,
            "upload_time": "2024-03-25T18:28:49",
            "upload_time_iso_8601": "2024-03-25T18:28:49.502978Z",
            "url": "https://files.pythonhosted.org/packages/e3/12/bf6a4d938f49c0cbda8211af18aacdb50f3960db995b46624b8c7202a8de/suitespotauth-0.3.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "860b12830df914a1c85f41f17455f118a659c3ee3989412133e26a36ff21ac80",
                "md5": "eb6607fa378704856fbddc8e28eb08e8",
                "sha256": "efe8cbba30e04d70783ff8b3c17bd56a3849b133e29f03bbeb5b4607f64c7765"
            },
            "downloads": -1,
            "filename": "suitespotauth-0.3.5.tar.gz",
            "has_sig": false,
            "md5_digest": "eb6607fa378704856fbddc8e28eb08e8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 8002,
            "upload_time": "2024-03-25T18:28:50",
            "upload_time_iso_8601": "2024-03-25T18:28:50.693828Z",
            "url": "https://files.pythonhosted.org/packages/86/0b/12830df914a1c85f41f17455f118a659c3ee3989412133e26a36ff21ac80/suitespotauth-0.3.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-25 18:28:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yhavin",
    "github_project": "suitespotauth",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "keyring",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "boto3",
            "specs": []
        },
        {
            "name": "botocore",
            "specs": []
        },
        {
            "name": "google-cloud-secret-manager",
            "specs": []
        },
        {
            "name": "google-api-core",
            "specs": []
        },
        {
            "name": "azure-identity",
            "specs": []
        },
        {
            "name": "azure-keyvault",
            "specs": []
        }
    ],
    "lcname": "suitespotauth"
}
        
Elapsed time: 0.30050s