Skip to main content

Panoramic Auth SDK

Getting Started

This SDK handles the access token generation using client_credentials flow against Panoramic. To install the SDK in your app, add it to your requirements.txt:

panoramic-auth==1.0.0

All you then need to do is subclass the OAuth2Client Python class from the SDK, pass your client_id and client_secret, and use the session attribute from your subclass when making HTTP requests:

# Import the class as usual
from panoramic.auth import OAuth2Client

# Note subclassing OAuth2Client below
class PanoramicApiClient(OAuth2Client):
    def __init__(self, base_url: str, client_id: str, client_secret: str):
        super().__init__(client_id, client_secret)
        self.base_url = base_url

    def async_data(self, data: Dict[str, Any]) -> Dict[str, Any]:
        url = urljoin('https://platform.panoramichq.com/api/example')
        # Note self.session below
        response = self.session.post(url=url, json=data)
        response.raise_for_status()
        return response.json()

Development

This repository does not have a dedicated docker image. At the moment, we create python virtual environment using command (in directory .venv inside current directory):

> python3 -m venv .venv

If you use pyenv and pyenv-virtualenv, you can create it using:

> pyenv virtualenv panoramic-auth

Then, you can switch to it from command-line using following command:

> source .venv/bin/activate

Or if using pyenv-virtualenv:

pyenv local panoramic-auth

Lastly, use following command to install dependencies (make sure you have correct python environment active):

> make install

Install pre-commit - useful to avoid commiting code that doesn't pass the linter:

> make pre-commit-install

This installs git hooks that run pre-commit.

Tests

Use following command to run all tests:

> make tests

Release process

To release a new version of the library, follow these steps:

  • In your PR, update version in setup.py and add entry to CHANGELOG.md
  • After merge, tag the commit with version number from setup.py. For example git tag v0.1.1. You can also do this by creating a new release.
  • This triggers a Travis pipeline which runs tests, linters and uploads the package to PyPI

Metadata

Release files for panoramic-auth 1.0.0

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

Source distribution (sdist)

Source distribution for panoramic-auth 1.0.0
File Size Uploaded Provenance
panoramic-auth-1.0.0.tar.gz 6.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for panoramic-auth 1.0.0
File Interpreter ABI Platform
panoramic_auth-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / panoramic-auth-1.0.0.tar.gz

Download URL panoramic-auth-1.0.0.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9104d087aa57c7b9d6e6a839546f2646d0e77ffc6540fc036ff370296acccb8d
BLAKE2b-256 checksum
How to use checksums
5895d5bec86d364228fe8a110828326d4bcad27655c2d43836d9edc4756c6fc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

Release files / panoramic_auth-1.0.0-py3-none-any.whl

Download URL panoramic_auth-1.0.0-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7318f8f7b70a8e7d300d33a1f7e1549a9546078bd9ff664589f9a4d61bb7a6d
BLAKE2b-256 checksum
How to use checksums
71dffc0bae2eb28f0cf1100ab931b06e014c2f87e75deb22fb8449d3a7727053
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.7

Security for panoramic-auth 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

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