Python SDK for the TruSTAR REST API

python-sdk, security, trustar-api
pip install trustar==0.3.15


Python SDK for the TruSTAR API

API/SDK Documentation

See for the official documentation to the TruSTAR Python SDK.



Make sure you have the latest version of Requests package

$ sudo pip install requests --upgrade

Using pip (recommended)

$ pip install trustar --upgrade

Manual Installation

  1. Get the latest SDK by downloading as a ZIP and extract locally. You can also clone the repository directly from GitHub

  2. Install requirements

  • Python 2.7+:
$ sudo pip install future python-dateutil pytz requests configparser
  • Python 3:
$ sudo pip3 install future python-dateutil pytz requests configparser
  1. Install SDK
$ cd trustar-python
$ python install --force


$ pip uninstall trustar

Running examples and tests

  • Retrieve or generate API credentials from the TruSTAR Station:
  • Inside the examples directory, create your own trustar.conf file from trustar.conf.example and Copy in your credentials and enclave IDs
$ cd examples
$ python
$ python3


To setup this project for development:

  1. Create a virtualenv using python 3:
virtualenv --no-site-packages -p python3 venv3
  1. Activate the virtualenv:
source ./venv3/bin/activate
  1. Install this package in editable mode:
pip install -e .
  1. Although step 3 will install the core requirements for the package, some additional packages are used during development (specifically, nose). To install these, run
pip install -r requirements.txt