Getting Started

It is very easy to become productive with the Nutonian Python API - just ensure that you have the prerequisite Python version and Eureqa libraries installed, obtain an access key, and then connect. Details are below.

Installation

Prerequisites

Install or Verify Python

The Eureqa API requires Python 2.7. Before getting started, verify your Python version or install it if you do not have it.

To verify your Python version in your terminal:

python --version

If Python is not installed, you can download it here: https://www.python.org.downloads

Install or Verify Pip

The Eureqa Python API is installed using pip. If you don’t have pip, follow the installation instructions here: https://pip.pypa.io/en/stable/installing/

Eureqa API Installation

Installing the Eureqa API

To install the Eureqa API, use your terminal to run:

pip install eureqa[==version]

You can find the correct version by opening Eureqa and going to Settings > Eureqa API

Upgrading or Downgrading the Eureqa API

To upgrade or downgrade the API, install again with the version specified, e.g.:

pip install eureqa[==version]

Note: pip does have “-upgrade” flag which will upgrade to the latest version. We recommend not using this flag and instead using the command above to install the specific version that you need.

Uninstalling the Eureqa API

To uninstall the Eureqa API:

pip uninstall eureqa

Connecting to Eureqa

To get started with the API, connect to Eureqa as follows:

Eureqa SaaS:

from eureqa import Eureqa

e = Eureqa(url='Eureqa URL', user_name='user name', key='access key')

Where:

  • ‘Eureqa URL’ is the base URL used to connect to Eureqa (e.g. “https://rds.nutonian.com”)
  • ‘user name’ is your Eureqa user name (e.g. ”bob@nutonian.com”)
  • ‘access key’ is your Eureqa API access key (see below)

Eureqa Local:

from eureqa import EureqaLocal

e = EureqaLocal(user_name='user name', key='access key')

or, if you have multiple Eureqa Local instances running on your computer:

from eureqa import EureqaLocal

e = EureqaLocal(instance='instance number', user_name='user name', key='access key')

Where:

  • ‘instance number’ is a number (first one is ‘1’) indicating the launch order of the instances of Eureqa Local
  • ‘user name’ is your Eureqa user name (e.g. ”bob@nutonian.com”)
  • ‘access key’ is your Eureqa API access key (see below)

Access Keys

The Eureqa Python API uses key-based authentication. To generate a license key for your user account, open Eureqa and navigate to Settings > Python API and select the option to “Get access key”

_images/get_access_key.png

Edit the Key name / description if desired and then select Generate Key. Copy and paste the access key into your code – the key will only be shown once!

_images/access_key.png

You may have up to 2 active keys a time. You can delete an existing key and generate a new key at any time.

Next Steps

Now that you have the Eureqa API installed and have successfully connected to Eureqa, get started uploading data, building models, generating reports and more.

Check out the Examples for sample code and the Eureqa API Reference for details on specific classes and functions.