Skip to main content

TPM 2.0 TSS Bindings for Python

Project description


Tests codecov Documentation Status CodeQL Code style: black PyPI version

TPM2 TSS Python bindings for Enhanced System API (ESYS), Feature API (FAPI), Marshaling (MU), TCTI Loader (TCTILdr), TCTIs, policy, and RC Decoding (rcdecode) libraries. It allows for custom TCTIs written in Python as well. It also contains utility methods for wrapping keys to TPM 2.0 data structures for importation into the TPM, unwrapping keys and exporting them from the TPM, TPM-less makecredential command and name calculations, TSS2 PEM Key format support, importing Keys from PEM, DER and SSH formats, conversion from tpm2-tools based command line strings and loading tpm2-tools context files.


Documentation for the latest release is hosted at


To install the master branch:

python3 -m pip install git+

To install latest stable from PyPi:

python3 -m pip install tpm2-pytss

NOTE: You may need option --user or sitewide permissions through something like sudo.

This is known to work with versions 2.4.0 of tpm2-tss or higher.



tpm2-pytss is distributed under the BSD 2 Clause License.

Project details

Release history Release notifications | RSS feed

This version


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tpm2-pytss-2.2.1.tar.gz (208.1 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page