CompZ
raw JSON → 1.0.0 verified Mon Apr 27 auth: no python
CompZ is a privacy-preserving compliance attestation SDK that anchors attestations to the Zcash blockchain. Version 1.0.0 is the initial release, with active development. Release cadence is not yet established.
pip install compz Common errors
error AttributeError: module 'compz' has no attribute 'CompZClient' ↓
cause Importing wrong symbol name after a failed installation or using an outdated version.
fix
Run 'pip install --upgrade compz' and verify import: from compz import CompZClient
error ValueError: Cannot submit attestation on mainnet without API key ↓
cause Attempting to use mainnet without providing an API key.
fix
Set environment variable COMPZ_API_KEY or pass api_key to constructor.
Warnings
gotcha The SDK defaults to mainnet. Always specify network='testnet' for development to avoid costly mistakes. ↓
fix client = CompZClient(network='testnet')
gotcha API key is required. Without it, the client raises a vague authentication error. ↓
fix Set COMPZ_API_KEY environment variable or pass api_key argument.
Imports
- CompZClient wrong
from compz_client import CompZClientcorrectfrom compz import CompZClient - Attestation wrong
import Attestationcorrectfrom compz import Attestation
Quickstart
from compz import CompZClient, Attestation
import os
client = CompZClient(
api_key=os.environ.get('COMPZ_API_KEY', ''),
network='testnet'
)
attestation = Attestation(
data={'compliance': 'approved'},
schema='https://example.com/schema.json'
)
result = client.submit(attestation)
print(result)