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
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tauth_sdk-0.1.1.tar.gz.
File metadata
- Download URL: tauth_sdk-0.1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfb064ff693d809bb37258e78e72becf235091869d9a54020964fd81115a39a7
|
|
| MD5 |
2cea101a6275755e3f021124d45826ab
|
|
| BLAKE2b-256 |
3cb7262bd54bf2f5d5f18f30834adf98536c65b0927c8ec386ec756b8cf51822
|
File details
Details for the file tauth_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: tauth_sdk-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e4805c19ba264f6d10900d24363150b4ae5e4954f3f21ab24508a0568cd5a9c
|
|
| MD5 |
a1cb9aab8af2d289ebdc2f7f6fda7991
|
|
| BLAKE2b-256 |
4f0d0fe4d575a71fc4c5d12d1f35a8393060a24c53c87d787f53ad4060202ef4
|