# tpm2-pytss Documentation

This project provides a Python API to access the tpm2-tss. If you’re looking for how to connect to a TPM 2.0 device in Python, you’re in the right place.

The core libraries provide are:

- tss2-esys: The Enhanced System API which is a simpler command interface to the TPM with full control and includes crypto protected session support: See the ESAPI spec.

- tss2-fapi: The Feature API is a high-level API to make interactions with the TPM as simple as possible and support automatic encrypted sessions when possible: See the FAPI spec.

- tss2-mu: The Marshaling and Unmarshaling API which provides serialization and deserialization of TPM data structures: See the MU spec.

- tss2-rc: The Response Code API, which provides a way to convert `TSS2_RC` error codes into human readable strings: See the RC spec.

- tss2-tctildr: The TPM Command Transmission Interface, which provides a way to get bytes to and from a TPM: See the TCTI spec.

Under the hood, bindings are provided via CFFI. However, the Python API abstracts things quite a bit so you’ll have to write less code.

Supported versions of Python are:

- 3.8

- 3.9

- 3.10

- 3.11

- 3.12