Skip to main content

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


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.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

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

treeship_sdk-0.1.0-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for treeship_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2f1571b0b4a9386117f35aa41703bd021b51cb8fa13563da0c35897e87112604
MD5 843b8c081ab0fed050151f2539f36e0e
BLAKE2b-256 8145748a4cee81e362a5bc17f19f1fefc56099c0b02afcf723a46fb17b5399d3

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for treeship_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 da16bba066cf7f63066b611e502a931c93a05076de40de2897a53d41376d2072
MD5 fc2eb35a1f46d90cd59eb0b11494492c
BLAKE2b-256 f40a0597f17cccb1d2304b82a4007d370ecf245e44c608c77687724f4eaa02cd

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