Views:
The Server & Workload Protection Python SDK consists of a package containing the module that you can use to interact with the API. If you would rather use the API directly via tools such as Postman and curl, you do not need an SDK.

Get set up to use the Python SDK Parent topic

Prerequisites Parent topic

  • Python version 3.4 or 3.7
    Note
    Note
    The Python executable must be in your system path. For Windows, in the Python installer, select Add Python 3. to PATH at the start of the installation. For Linux, Python is added to the system path during Python installation.
  • pip package manager
    Note
    Note
    For Windows, pip is installed with Python. For Linux, pip is installed separately from Python. You can install pip using the package manager of your Linux distribution.

Download and install the Python SDK Parent topic

Procedure

  1. Download SDK.
  2. Extract the Python SDK ZIP file.
  3. Open a Command Line or Terminal and change the current directory to the directory of the extracted contents.
  4. Enter the following command to install the module and dependencies:
    Note
    Note
    The commands below assume that the Python executable is in your system path.
    Windows
    python -m pip install .
    Linux/Mac
    python3 -m pip install .

What to do next

Install a Python IDE Parent topic

You can use any Python IDE to develop for the Server & Workload Protection API. If you need to install one, we recommend using PyCharm Community Edition. It is free, well-supported, and has a comprehensive feature set.

Windows Parent topic

Linux Parent topic

Follow the PyCharm installation instructions for your Linux distribution.
Tip
Tip
If you prefer to use Eclipse, the following videos step you through the process of setting up the Eclipse IDE with the Python SDK:

Add the SDK to a project in PyCharm Parent topic

Follow the procedure below to create a PyCharm project that can run the code examples in the Server & Workload Protection automation guides.

Procedure

  1. Run PyCharm.
  2. Click Create New Project.
  3. In Location, change the folder you wish to save to if needed and then enter a name for the project.
  4. Click Project Interpreter: New Virtualenv environment.
  5. Select Inherit global site-packages.
  6. Click Create.

What to do next

Next Steps Parent topic

  • To get familiar with how to use the SDK with the Server & Workload Protection API, see the Send Your First Request Using the API guide.
  • If you are already familiar with using an API or have specific tasks that you want to use the SDK for, see Run the Code Examples to get started with the task-based examples in other Server & Workload Protection automation guides.
    Tip
    Tip
    You can add the code examples from any of the other Server & Workload Protection automation guides to the project you created above.