Skip to main content

Python Wrapper for OpenTDF SDK

Project description

OpenTDF SDK

The OpenTDF Python SDK allows developers to easily create and manage encrypted Trusted Data Format (TDF) objects and interact with Key Access and Attribute Provider (KAS, AP).

Installation

Upgrade pip3 to the latest version and run

pip3 install opentdf

Authentication

OpenTDF has chosen Keycloak as its reference implementation IdP(https://github.com/virtru/opentdf-aux/tree/main/documentation/quickstart).

Create Encrypted TDF Object (minimal example)

from opentdf import TDFClient

oidc_creds = OIDCCredentials()
oidc_creds.set_client_credentials(client_id = "tdf-client",
                                 client_secret = "123-456",
                                 organization_name = "tdf",
                                 oidc_endpoint = "https://localhost:8443")

client = TDFClient(oidc_credentials = oidc_creds, kas_url = 'http://localhost:8080/kas')

client.encrypt_file("sensitive.txt", "sensitive.txt.tdf")

Terms of Service Privacy Policy

Project details


Release history Release notifications | RSS feed

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

opentdf-0.1.0a1487-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

opentdf-0.1.0a1487-cp39-cp39-macosx_10_14_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.9 macOS 10.14+ x86-64

opentdf-0.1.0a1487-cp38-cp38-win_amd64.whl (2.8 MB view hashes)

Uploaded CPython 3.8 Windows x86-64

opentdf-0.1.0a1487-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

opentdf-0.1.0a1487-cp38-cp38-macosx_10_14_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.8 macOS 10.14+ x86-64

opentdf-0.1.0a1487-cp37-cp37m-win_amd64.whl (2.8 MB view hashes)

Uploaded CPython 3.7m Windows x86-64

opentdf-0.1.0a1487-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

opentdf-0.1.0a1487-cp37-cp37m-macosx_10_14_x86_64.whl (3.7 MB view hashes)

Uploaded CPython 3.7m macOS 10.14+ x86-64

opentdf-0.1.0a1487-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (5.5 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

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