Skip to main content

truthlocks-bedrock

Cryptographic receipt generation for every AWS Bedrock model invocation. Part of the Truthlocks MAIP (Machine-Attested Identity Protocol) ecosystem.

Installation

pip install truthlocks-bedrock

Quick Start

import boto3
from truthlocks_bedrock import MAIPBedrockWrapper

# Create the receipt-generating wrapper
bedrock = boto3.client("bedrock-runtime")
wrapper = MAIPBedrockWrapper(client=bedrock)

# Make API calls -- receipts are generated automatically
response, receipt = wrapper.invoke_model(
    modelId="anthropic.claude-3-sonnet-20240229-v1:0",
    body='{"messages": [{"role": "user", "content": "Hello"}]}',
)

# receipt contains a cryptographic proof of the invocation
print(receipt.receipt_id)

API

Class Description
MAIPBedrockWrapper Drop-in wrapper for the Bedrock Runtime client that auto-generates MAIP receipts for every model invocation

What You Get

  • Tamper-proof audit trail for every model invocation, embedding call, and streaming response
  • Cryptographic receipts anchored to a transparency log with sub-40 ms latency
  • Zero-config drop-in wrapper -- swap one line and receipts flow automatically
  • Compliance-ready evidence packages for SOC 2 Type II, ISO 27001, and EU AI Act

How It Works

truthlocks-bedrock is a thin wrapper around maip-ai-connectors, the core Truthlocks MAIP SDK for Python. It re-exports the Bedrock-specific wrapper so you can install only what you need.

Requirements

Documentation

Full guides, API reference, and examples: docs.truthlocks.com/sdk/bedrock

License

Apache 2.0 -- see LICENSE.

Download files

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

Source Distribution

truthlocks_bedrock-1.0.2.tar.gz (2.5 kB view details)

Uploaded Source

Built Distribution

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

truthlocks_bedrock-1.0.2-py3-none-any.whl (2.7 kB view details)

Uploaded Python 3

File details

Details for the file truthlocks_bedrock-1.0.2.tar.gz.

File metadata

  • Download URL: truthlocks_bedrock-1.0.2.tar.gz
  • Upload date:
  • Size: 2.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.7

File hashes

Hashes for truthlocks_bedrock-1.0.2.tar.gz
Algorithm Hash digest
SHA256 cb8d4dfedf0539467c8c001d41847a7a04b54dc74331a0301e382d2d761ac1b6
MD5 322d39d9ad3a57d1fcd41cd0a5e293ed
BLAKE2b-256 e4fad3ff851695d9ba04cd8a9b11c29a186ca7f5eac20cee45cb2ff4de95680e

See more details on using hashes here.

File details

Details for the file truthlocks_bedrock-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for truthlocks_bedrock-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5c504e5201e82c2a762000f4c9a7a37bbe82982ca5b978084bfa385a785c303e
MD5 d9d533ab527459871b0defbb1fa98ff4
BLAKE2b-256 39c04396251b06417f3e9e723a2155496e8b175eb675bce320dd91efd8fdb40c

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 files

1.0.1

2 files

1.0.0

2 files

Supported by

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