Topics on this page
The Workload Security 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
Python version 3.4 or 3.7
The Python executable must be in your system path. For Windows, in the Python installer, select Add Python 3.
to PATHat the start of the installation. For Linux, Python is added to the system path during Python installation.
pip package manager
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
Make sure that you download the SDK that is compatible with Workload Security.
- Download SDK.
- Extract the Python SDK ZIP file.
- Open a Command Line or Terminal and change the current directory to the directory of the extracted contents.
Enter the following command to install the module and dependencies:
The commands below assume that the Python executable is in your system path.
python -m pip install .
python3 -m pip install .
Install a Python IDE
You can use any Python IDE to develop for the Workload Security API. If you need to install one, we recommend using PyCharm Community Edition. It is free, well-supported, and has a comprehensive feature set.
Download PyCharm Community Edition.
Follow the PyCharm installation instructions for your Linux distribution.
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
Follow the procedure below to create a PyCharm project that can run the code examples in the Workload Security automation guides.
- Run PyCharm.
- Click Create New Project.
- In Location, change the folder you wish to save to if needed and then enter a name for the project.
- Click Project Interpreter: New Virtualenv environment.
- Select Inherit global site-packages.
- Click Create.
- To get familiar with how to use the SDK with the Workload Security 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 Workload Security automation guides.
You can add the code examples from any of the other Workload Security automation guides to the project you created above.