Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 2.7.3 instead.

TNG Python SDK

PyPI

中文文档

Trusted Network Gateway (TNG) Python SDK — encrypted HTTP requests with remote attestation.

Quick Start

pip install tng-sdk
from tng import Tng
import requests

# Create TNG client (no_ra = disable remote attestation for testing)
tng = Tng(no_ra=True)

# Wrap a requests session
session = requests.Session()
tng.wrap_requests(session)

# All requests flow through the encrypted TNG tunnel
resp = session.get("http://tng-server:10001/api/data")
print(resp.json())

tng.close()

Supported Clients

Client Method
requests tng.wrap_requests(session)
httpx tng.wrap_httpx(client)
openai tng.wrap_openai(client)

Security Options

# Disable remote attestation (testing only)
tng = Tng(no_ra=True)

# With verifier
tng = Tng(verify={"as_addr": "http://127.0.0.1:8080/", "policy_ids": ["default"]})

# With attester
tng = Tng(attest={"aa_addr": "unix:///run/aa.sock", "model": "passport"})

# Bidirectional attestation
tng = Tng(
    attest={"aa_addr": "unix:///run/aa.sock"},
    verify={"as_addr": "http://127.0.0.1:8080/", "policy_ids": ["default"]}
)

Encryption Protocol

# OHTTP is the default
tng = Tng(no_ra=True)

# Use rats-TLS instead of OHTTP (mutually exclusive)
tng = Tng(no_ra=True, rats_tls={"multiplex": True})

Documentation

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tng_sdk-2.8.0-py3-none-win_amd64.whl (30.6 MB view details)

Uploaded Python 3Windows x86-64

tng_sdk-2.8.0-py3-none-manylinux_2_17_x86_64.whl (37.1 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

tng_sdk-2.8.0-py3-none-manylinux_2_17_aarch64.whl (35.8 MB view details)

Uploaded Python 3manylinux: glibc 2.17+ ARM64

tng_sdk-2.8.0-py3-none-macosx_11_0_x86_64.whl (28.9 MB view details)

Uploaded Python 3macOS 11.0+ x86-64

tng_sdk-2.8.0-py3-none-macosx_11_0_arm64.whl (27.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file tng_sdk-2.8.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: tng_sdk-2.8.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 30.6 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for tng_sdk-2.8.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 78fc955fe64e596c2225f4d859210e9657b2d7ca9e04b7e55f0cd54eb3e37b6e
MD5 30e56b0d8cf5fff28ec6385e96862931
BLAKE2b-256 1f0539a02e97781385d64c81dd6dbd05ae54658c422348e90d8dc0699bdb03fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for tng_sdk-2.8.0-py3-none-win_amd64.whl:

Publisher: build-python-sdk.yml on inclavare-containers/TNG

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tng_sdk-2.8.0-py3-none-manylinux_2_17_x86_64.whl.

File metadata

File hashes

Hashes for tng_sdk-2.8.0-py3-none-manylinux_2_17_x86_64.whl
Algorithm Hash digest
SHA256 b6098e351a7eec891a0819670725c81ae753e7d7ce75eb116989ca5fc4ef0e13
MD5 a51cc999e431152511bd4b4d1638286e
BLAKE2b-256 d6a82f6a8e660986379fa87f9d8b0492fdeb4fa76776811f89695ff2faf58fa5

See more details on using hashes here.

Provenance

The following attestation bundles were made for tng_sdk-2.8.0-py3-none-manylinux_2_17_x86_64.whl:

Publisher: build-python-sdk.yml on inclavare-containers/TNG

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tng_sdk-2.8.0-py3-none-manylinux_2_17_aarch64.whl.

File metadata

File hashes

Hashes for tng_sdk-2.8.0-py3-none-manylinux_2_17_aarch64.whl
Algorithm Hash digest
SHA256 861f0104a10a12f40621e3f19f746e26fb2168ac480fe269c699afa633ba5571
MD5 32b6994d1caa57a1cc4a053555617816
BLAKE2b-256 97e175cddea3adbc676aea246bc4223b60607b8b95471b4029c175fe57a551af

See more details on using hashes here.

Provenance

The following attestation bundles were made for tng_sdk-2.8.0-py3-none-manylinux_2_17_aarch64.whl:

Publisher: build-python-sdk.yml on inclavare-containers/TNG

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tng_sdk-2.8.0-py3-none-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for tng_sdk-2.8.0-py3-none-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 9a483f6dc451db8a408d35d2b2fa2042755623cf385c976e3c1f0475d80acd59
MD5 11364a8b0d5a21e6ba9af9a446a0c38e
BLAKE2b-256 1d38a121c18c0e2fd26f70510bb0ecff8f8c79966b4c0f30aad2d279a6a151af

See more details on using hashes here.

Provenance

The following attestation bundles were made for tng_sdk-2.8.0-py3-none-macosx_11_0_x86_64.whl:

Publisher: build-python-sdk.yml on inclavare-containers/TNG

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tng_sdk-2.8.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tng_sdk-2.8.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d66d32cb309013459c392404ad5276e4517e29925584299a16afc677b976c599
MD5 781192a1cc38f6dbdeaf39de6a72a9f8
BLAKE2b-256 d747a231559776c0a934a93cf8b1b1865c66a9927c660918ecc4852025bd44fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for tng_sdk-2.8.0-py3-none-macosx_11_0_arm64.whl:

Publisher: build-python-sdk.yml on inclavare-containers/TNG

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.8.0 This release

5 files

2.7.3

5 files

2.7.2

1 file

2.7.1

1 file

2.7.0

1 file

2.6.0

1 file

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page