Skip to content

Installation & Authentication

Contact support@innotescus.io to receive the Innotescus library and have your API access keys enabled and accessible from the Admin page.

Prerequisites

The API client is written in Python 3, so you'll need version 3.7 or higher. Please check python.org for detailed installation instructions for your operating system.

Install with pip

pip install innotescus

Click here for more information on the innotescus library, including version history.

Retrieve Token

In order to authenticate your instance of the API, you'll need to retrieve your client_id and client_secret from the API Keys tab of the Admin Page.

To create the API key, type a name into the input field marked 'API Key Name' and click 'create API key.' An entry will appear in the table with your client_id visible and client_secret hidden. Click the icon to copy the client_secret to your clipboard.

Generate API Token

Configuration & Authentication

The innotescus client supports flexible configuration via multiple different mechanisms. The information in the table below will be explained in the following sections.

Config File Attribute Env Var description
INNO_CONFIG File path for addition .ini config
client_id INNO_CLIENT_ID Innotescus API Client ID (see: admin)
client_secret INNO_CLIENT_SECRET Innotescus API Client Secret (see: admin)

Prioritization

The Innotescus client will prioritize the configuration values that it finds according to the order below:

  1. Set directly via code (only possible with client_id and client_secret)
  2. Per-setting environmental variables
  3. A config-file path specified by the INNO_CONFIG environmental variable
  4. A config-file in your $HOME/.innotescus/client.ini directory

Authentication in Code

If you wish to authenticate your instance of the Innotescus client in code, use your client_id and client_secret retrieved from the 'API Keys' tab of the Admin page, as shown below.

from innotescus import client_factory

client = client_factory(client_id='yourid', client_secret='yoursecret')

Environmental Configuration

Settings may also be set via environmental variables. If a setting is provided both in an environmental variable and in a config file, the environmental variable will be used instead.

$ export INNO_CLIENT_ID=my-Client-Id
$ export INNO_CLIENT_SECRET=my-s3cr3tkey
$ python your-script.py

File-based Configuration

An ini-style configuration file can be provided to configure the innotescus client. The file may either be placed in your user's home directory at $HOME/.innotescus/client.ini, or at any arbitrary location specified by INNO_CONFIG.

Example File Contents

[innotescus]
client_id = my-client-id
client_secret = my-s3cr3tkey