Current ThreatQ Version Filter

Installation

Before using the ThreatQ SDK, you must install the SDK package and configure access to the ThreatQ package repository. The following procedures describe how to install the SDK on supported operating systems and verify that the installation completed successfully.

Prerequisites

Before installing the ThreatQ SDK, ensure you have:

  • Access to a ThreatQ instance.
  • Valid repository credentials for the ThreatQ package repository.
  • Python installed on the system.
  • An OAuth Client ID and Client Secret (recommended) or ThreatQ user credentials.

Install on macOS

Use the following steps for macOS installs. These steps are intended to be run from the terminal window.

  1. Install Pip if you have not done so already by running the following command:
    sudo easy_install pip

  2. Create a pip directory and pip.conf file using the following command:
    mkdir ~/.pip touch ~/.pip/pip.conf

  3. Open the pip.conf file in a text editor using the following command:
    open -t pip.conf

  4. Enter the following in the text editor:
    [global]
    index-url = https://system-updates.threatq.com/pypis
    extra-index-url = https://USERNAME:PASSWORD@extensions.threatq.com/threatq/integrations
    https://USERNAME:PASSWORD@extensions.threatq.com/threatq/sdk

    Replace USERNAME and PASSWORD with your ThreatQ repository credentials.

  5. Save and close the the pip.conf file.
  6. Run the following command to install the ThreatQ SDK:
    sudo pip install threatqsdk

The ThreatQ SDK is now installed. Proceed to the Authentication steps.

Install on Windows

Use the following steps for Windows installs. These steps are intended to be run from the command prompt window.

  1. Open a command prompt window and navigate to the /Scripts directory within your Python directory.
  2. Run the following command to install the ThreatQ SDK:
    pip install -i https://USERNAME:PASSWORD@extensions.threatq.com/threatq/sdk threatqsdk

    Replace USERNAME and PASSWORD with your ThreatQ repository credentials.

The ThreatQ SDK is now installed. Proceed to the Authentication steps.