TruSTAR Python SDK¶
To jump right in, begin with the Quick Start page.
The TruSTAR Python SDK is a Python package that can be used to easily interact with the TruSTAR Rest API from within any Python program. It is compatible with both Python 2 and Python 3, however some of the example scripts found on the GitHub repository specifically target Python 2 only.
This documentation is for the latest version of the Python SDK, version 0.3.24, which is compatible with version 1.3 of the Rest API.
The latest version of the package can be installed by running
pip install trustar, or by manually downloading it from https://pypi.python.org/pypi/trustar. (See https://packaging.python.org/tutorials/installing-packages/#use-pip-for-installing for a reference on how to use pip to install and manage your packages.) If you already have a the package installed, you can upgrade to the newest version by running
pip install trustar --upgrade. If you would like to install a specific version of the package, for instance 0.2.4, you can do so by running
pip install trustar==0.2.4. This will also work if you already have the package installed; it will upgrade/downgrade to the version that you have specified.
To determine which version you have installed (assuming you have already installed the package), you can run
pip show trustar if you have version 1.3 or later of pip installed. If your version of pip is older than 1.3, then run
pip freeze to list all of your installed packages, along with their version numbers, and find where it lists the
Versions 0.2.0 through 0.2.5 of the SDK are compatible with version 1.2 of the Rest API. Version 0.3.0 and later of the SDK are compatible with version 1.3 of the Rest API.
Source Code and Release Notes¶
The source code can be viewed on GitHub at https://github.com/trustar/trustar-python. Release notes can be found at https://github.com/trustar/trustar-python/releases.
To view the source code for a previous version, follow these steps:
- Visit https://github.com/trustar/trustar-python/releases.
- Click the hash number underneath the version you are interested in.
- Click the “Browse files” button in the top right.
Instructions on how to configure the SDK can be found within the documentation for the TruStar class.
When errors are returned from the REST API, the message will contain a “Trace ID” that TruSTAR Support can use to correlate against internal system logs to help debug the issue.