Skip to main content

Python SDK for Tauth — C2PA media provenance and signing

Project description

tauth-sdk

Python SDK for Tauth — sign media files with C2PA content credentials and register provenance on Ethereum.

Installation

pip install tauth-sdk

Quick start

from tauth import TauthClient

client = TauthClient(api_key="tk_...")

# Sign a file
result = client.sign("photo.jpg", creator="Alice Smith", description="Product launch")
print(result["tx_hash"])      # Ethereum transaction hash
print(result["download_url"]) # Signed file URL

# Verify a file
info = client.verify_file("signed_photo.jpg")
print(info["valid"])    # True
print(info["manifest"]) # C2PA manifest contents

# List all signed assets
assets = client.list_assets()

API key

Generate an API key from your Tauth dashboard or via the API:

curl -X POST https://api.tauth.io/org/api-keys \
  -H "Authorization: Bearer <jwt>" \
  -H "Content-Type: application/json" \
  -d '{"name": "production", "scopes": ["sign", "verify"]}'

You can also set TAUTH_API_KEY in your environment instead of passing api_key directly.

Supported file types

JPEG, PNG, WebP, MP4, PDF

Reference

TauthClient(api_key, base_url)

Parameter Default Description
api_key TAUTH_API_KEY env API key starting with tk_
base_url https://api.tauth.io Override for self-hosted

sign(file_path, *, creator, description, extra_assertions)

Returns dict with asset_id, file_hash, tx_hash, download_url.

verify_file(file_path) / verify_url(url) / verify_hash(sha256_hex)

Returns dict with valid, manifest, blockchain.

list_assets()

Returns list of asset dicts for your organization.

TauthError(status, detail)

Raised on any non-2xx API response. Has .status (int) and .args[0] message.

Project details


Download files

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

Source Distribution

tauth_sdk-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

tauth_sdk-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file tauth_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: tauth_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for tauth_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 35f31d134fd68795af612b0e46dc3be66133af49b242d42a4ea0c572cf551d79
MD5 cf386661fa3945a72db1e1d543cbf385
BLAKE2b-256 fa60bb7453e556eba1aafb674366116823a5a66cc909694b792d9ebf0babc76b

See more details on using hashes here.

File details

Details for the file tauth_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: tauth_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for tauth_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52abd1c179ed78769e2cefaf738f8858f48fbab2d0cae9b8a37fdfd26fd3220f
MD5 7b04f41d7001115190c41259e753cce2
BLAKE2b-256 2daf06febf29d28b50ffb61af2ffdc06e622ddd37a7ca3016a748dc24b21875c

See more details on using hashes here.

Supported by

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