# Python library

# Introduction

The Trusted Twin Python library makes it easy to use the Trusted Twin user infrastructure API in Python applications. The library version is consistent with the Swagger version of the Trusted Twin API.

The Trusted Twin Python library offers a synchronous (tt_api) and an asynchronous(tt_api_async) client type.

# Requirements

The Trusted Twin Python library requires Python 3.6 or above and the requests package.

The asynchronous client type requires the aiohhtp package.

# Installation

You can install the Trusted Twin Python library using the pip package manager for Python.

For synchronous client:

For asynchronous client:

# Authorization

On the Trusted Twin platform, User authentication is based on User Secrets:

  • If you have a User Secret, use it to authenticate REST requests:
  • If you have a User Secret PIN, you can generate a User Secret (see documentation about the create_user_secret endpoint for more details):

# Example calls

# Synchronous client

# Asynchronous client

Was this article helpful?