Skip to main content

vercre-sdk

Python SDK for the VERCRE Verifiable Credentials API.

Installation

pip install vercre-sdk

Quick Start

from vercre_sdk import VercreClient

client = VercreClient(
    api_key="vercre_admin_your_key_here",
    base_url="https://api.vercre.io",
)

# Issue a credential
credential = client.issue_credential(
    issuer_did="did:key:z6Mk...",
    subject_did="did:key:z6Mp...",
    credential_type="KYCBasic",
    claims={"name": "Alice Johnson", "country": "US"},
)
print(f"Issued: {credential.credential_id}")

# Verify a credential
result = client.verify_credential(credential=credential.credential)
print(f"Valid: {result.valid}, Decision: {result.compliance_decision}")

Async Usage

import asyncio
from vercre_sdk import AsyncVercreClient

async def main():
    async with AsyncVercreClient(api_key="vercre_admin_xxx") as client:
        result = await client.verify_credential(credential=my_credential)
        print(result.compliance_decision)

asyncio.run(main())

Error Handling

from vercre_sdk import VercreClient, RateLimitError, AuthenticationError

client = VercreClient(api_key="...")

try:
    result = client.verify_credential(credential=cred)
except RateLimitError as e:
    print(f"Rate limited. Retry after {e.retry_after}s")
except AuthenticationError:
    print("Invalid API key")

Available Methods

Credentials

  • issue_credential() - Issue a new verifiable credential
  • verify_credential() - Verify a credential with compliance scoring
  • revoke_credential() - Revoke a credential
  • get_credential_status() - Check on-chain attestation status
  • get_credential() - Look up credential by ID
  • list_credentials() - List credentials by subject DID

Verification

  • verify_presentation() - Verify a W3C Verifiable Presentation

Issuers

  • get_issuer() - Get issuer details
  • list_issuers() - List registered issuers
  • check_issuer_can_issue() - Check credential type authorization

Disputes

  • file_dispute() - File a dispute against a credential
  • get_dispute() - Get dispute details
  • list_disputes() - List disputes

Reputation

  • get_reputation() - Get issuer reputation score
  • submit_feedback() - Submit verifier feedback

Webhooks

  • register_webhook() - Register a webhook endpoint
  • list_webhooks() - List registered webhooks
  • delete_webhook() - Remove a webhook

Billing

  • get_subscription() - Get current plan
  • get_usage() - Get usage and remaining quota
  • subscribe() - Change billing plan
  • get_billing_portal_url() - Self-service billing management

Keys

  • rotate_key() - Rotate signing key for a DID
  • list_key_versions() - List key version history

License

MIT

Release files for vercre-sdk 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vercre-sdk 1.0.0
File Size Uploaded
vercre_sdk-1.0.0.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vercre-sdk 1.0.0
File Interpreter ABI Platform
vercre_sdk-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / vercre_sdk-1.0.0.tar.gz

Download URL vercre_sdk-1.0.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
ea64163f19429f7571f4b350536054861abf90d431cda917e6b6065acce48867
BLAKE2b-256 checksum
How to use checksums
e3716f57a586f4ce70db3ecfb5921483ee63979f39e89f0ea906a409a6bb36a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / vercre_sdk-1.0.0-py3-none-any.whl

Download URL vercre_sdk-1.0.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83a557a095c7256fff800379132e4549b1fc7b36f8c3b350b255a5d4f43335e8
BLAKE2b-256 checksum
How to use checksums
f6c65e4dec4dcc805e8ba59a1a1a03a20404c0d7c7d9b012a93e2b8346a09bfb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page