IntelliJ IDEA Setup Instructions

Table of Contents

Prerequisites

These instructions assume you have already installed:

  • Python 2.7:
  • Trusted Analytics Platform Python REST Client and required dependencies.
  • IntelliJ IDEA.

Verify the Python plugin is enabled in IntelliJ by choosing File ‣ Settings, searching for Python, and choosing Plugins from the pane on the left-hand side.

Trusted Analytics Platform should work with any version of IntelliJ IDEA but these instructions were tested with IntelliJ IDEA 13.1.3 Ultimate.

Setup

  1. Select New Project on IntelliJ IDEA’s initial screen.

  2. Select Python as the project type and choose Next.

    1. Choose Next leaving Create project form template unchecked.
    2. Choose Python 2.7 as the Python Interpreter and choose the Next button.
      1. If Python 2.7 does not appear in the list you will need to configure a Python 2.7 Interpreter.
        1. Choose the Configure button.
        2. Choose the plus sign +.
        3. Choose Python SDK.
        4. Choose Add Local.
        5. Browse for your local Python 2.7 installation. On RedHat and CentOS this is probably /usr/bin/python.
        6. Choose the OK button.
    3. Give your project a name, for example, myproject.
    4. Choose the Finish button.
  3. Choose File ‣ Project Structure.

    1. Make sure Python 2.7 is selected as the Project SDK and choose Apply.
    2. Choose Libraries in the left hand pane.
    3. Choose the plus sign +.
    4. Choose Java and browse to the Trusted Analytics Platform Python REST Client libraries. On RedHat and CentOS these are found under ‘/usr/lib/trustedanalytics/rest-client/python’.
    5. Choose classes.
    6. Choose myproject and click OK button.
    7. Name the library “ta-python-client”.
    8. Choose OK button.
  4. Choose File ‣ New ‣ Python File.

  5. Name the file ‘test’ and type in the following code:

    import trustedanalytics as ta
    ta.server.host = "correct host name or IP address"
    ta.connect()
    ta.server.ping()
    
  6. Choose Run ‣ Run, you should see the output:

    Successful ping to Trusted Analytics ATK at http://localhost:9099/info
    
  7. Next take a look at the included examples.