Cryptographic attestations for AI agents
Project description
treeship-sdk
Cryptographic attestations for AI agents.
Installation
pip install treeship-sdk
Quick Start
from treeship import Treeship
# Initialize (uses TREESHIP_API_KEY and TREESHIP_AGENT env vars)
ts = Treeship()
# Create an attestation
result = ts.attest(
action="Approved loan application #12345",
inputs_hash=ts.hash({"customer_id": "cust_123", "amount": 50000})
)
print(f"Attestation: {result.attestation_id}")
print(f"Verify at: {result.url}")
Environment Variables
| Variable | Description |
|---|---|
TREESHIP_API_KEY |
Your API key (required for attest) |
TREESHIP_AGENT |
Default agent slug |
TREESHIP_API_URL |
API URL (default: https://api.treeship.dev) |
Async Support
from treeship import AsyncTreeship
async with AsyncTreeship() as ts:
result = await ts.attest(
action="Processed request",
inputs_hash=ts.hash(request_data)
)
Verification
# Verify an attestation
result = ts.verify("attestation-id-here")
print(f"Valid: {result['valid']}")
Documentation
License
MIT
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
treeship_sdk-0.1.1.tar.gz
(5.5 kB
view details)
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 treeship_sdk-0.1.1.tar.gz.
File metadata
- Download URL: treeship_sdk-0.1.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a405d7147bea899be91a45b706ab9a136c68e03e56ccf4fe4f1c8f403b02eeb7
|
|
| MD5 |
321519ce803bfacb65a75243a8fc7464
|
|
| BLAKE2b-256 |
519e7b0d3b380d9ac63be486bf6b85ed0d6bc1c5bc1ed717b990c2e421a80301
|
File details
Details for the file treeship_sdk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: treeship_sdk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5cf0bb71d09f2564de9ad41ae5d899689b85f60ac9d5a3a9ae91d4c8fd04fc2
|
|
| MD5 |
1a714a00cd9539ed9a4e096b89b9ea54
|
|
| BLAKE2b-256 |
8a623a6e79bd185e867835ad51b7cc0cc058dde295352e168fca1b5a13ac5fc4
|