Skip to main content

Python App Store API Client

A python implmentation of the Intelligent Plant industrial appstore API client

See the example folder for example on how to use the library for authorization code and implicit OAuth grant flows.

Getting started

Installing using pip

pip install intelligent-plant

Installing from Source

Using pip:

pip install git+https://github.com/intelligentplant/py-app-store-api

Alternatively clone the Git repo:

git clone https://github.com/intelligentplant/py-app-store-api.git

Example Scripts

The 'example' folder contains a series of examples which demonstrate the available authentication methods and queries that you can make using this library.

To install dependencies used by the example scripts run

pip install -r example-requirements.txt

Querying the Industrial App Store

In order to query the industrial app store you must register as a developer and create an app registration. Full instructions can be found here: https://wiki.intelligentplant.com/doku.php?id=dev:app_store_developers

Once you have created and app registration you will need to copy and rename config-example.json to config.json and populate the id and secret fields with you app ID and app secret.

To run the authorization code grant flow example run:

python example/authorization_code_grant_flow.py

To run the authorization code grant flow example with the PKCE extension run:

This is the recommended flow for web and native applications.

python example/authorization_code_grant_flow_pkce.py

To run the device code flow example run:

The device code flow is disabled by default, you must enable it on the app registration

This is the recommended flow for CLI apps and tools.

python example/device_code_flow.py

To run the implicit grant flow example run:

The implicit grant flow is deprecated and is disabled by default

python example/implicit_grant_flow.py

Saving your session to reduce number of logins

The intelligent_plant.session_manager module provides functionality to save your session to your operating systems keyvault using the library keyring. To use this module you must have keyring installed:

pip install keyring

With keyring installed you can now use it as shown in the stored session examples.

Running the stored session example will use the device code flow to authenticate the first time (or if your session expires) but will otherwise use the stored credentials:

python example/stored_session/stored_session.py

You can see the stored session values using:

python example/stored_session/get_stored_session.py

And you can clear the stored session using:

python example/stored_session/clear_session.py

You can also see this being used in a Jupyter notebook in example/stored_session/jupyter.ipynb.

Querying a local App Store Connect or Data Core node

To run the NTLM (windows authentication) example you will need to have a data core node available on the local network. If you have an App Store Connect (https://appstore.intelligentplant.com/Home/DataSources) installed locally you can run the example without modification. If you are trying to authenticate with a data core node you will need to change the base_url variable defined in the script to match the URL of the Data Core admin UI.

Run the example using:

python example/ntlm_example.py

Example Notebooks

You can find examples of how to use the library to make queries in our Jupyer Hub demo notebooks (these notebooks expect a valid Industrial App Store access token to be present in the ACCESS_TOKEN environment variable).

https://github.com/intelligentplant/jupyter-hub-demo/tree/master/Python

To use this library as part of a Jupyter Notebook join the Jupyter Hub:

https://appstore.intelligentplant.com/Home/AppProfile?appId=40d7a49722f84be4986318bb5cc98cf3

Metadata

Release files for intelligent-plant 1.8.1

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

Source distribution (sdist)

Source distribution for intelligent-plant 1.8.1
File Size Uploaded Provenance Actions
intelligent_plant-1.8.1.tar.gz 16.1 kB Without provenance Details for intelligent_plant-1.8.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for intelligent-plant 1.8.1
File Interpreter ABI Platform Actions
intelligent_plant-1.8.1-py3-none-any.whl Python 3 none any Details for intelligent_plant-1.8.1-py3-none-any.whl

Total release size: 34.0 kB

Release files / intelligent_plant-1.8.1.tar.gz

Download URL intelligent_plant-1.8.1.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
dca1ac5f136ebf542591ec77b4c0d78b311e0fd69bb59bbddd3f4db0a6965828
BLAKE2b-256 checksum
How to use checksums
4ff48326590216bb9dc4d3b9e13a39d397c6449956616b1288a7d3da37bd99fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.4

Release files / intelligent_plant-1.8.1-py3-none-any.whl

Download URL intelligent_plant-1.8.1-py3-none-any.whl
Size 17.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
817e393c445b3a1737eb4b5e5af8ca159b9e3f6d98f5f1f69ab095ca8e8af938
BLAKE2b-256 checksum
How to use checksums
cd57e0d39338b2fc77873041cbf56cd7126449f48343a77276502af2c1c32296
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.4

Security for intelligent-plant 1.8.1

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