Beltic logo
Python SDK Guide

Installation

Install and configure the Beltic Python SDK for credential validation, signing, and verification.

Coming Soon: The Python SDK is currently in development. The package name and API may change before release. For production workflows, use the CLI or TypeScript SDK.

Requirements

  • Python >= 3.10
  • pip or pipx for package installation

Installation (Preview)

pip install beltic-sdk
pipx install beltic-sdk
poetry add beltic-sdk

Dependencies

The SDK automatically installs these dependencies:

PackageVersionPurpose
cryptography>= 41.0Ed25519/ES256 cryptographic operations
pyjwt[crypto]>= 2.8JWS/JWT encoding and decoding
jsonschema>= 4.20JSON Schema validation
pydantic>= 2.5Type validation and serialization
httpx>= 0.25Async HTTP client for status checks

Verify Installation

import beltic

print(beltic.__version__)
# Output: 0.1.0

Basic Import

from beltic import (
    # Validation
    validate_developer_credential,
    validate_agent_credential,
    is_developer_credential,
    is_agent_credential,
    
    # Signing
    sign_credential,
    generate_key_pair,
    import_key_from_pem,
    export_key_to_pem,
    
    # Verification
    verify_credential,
    decode_token,
    
    # Trust Chain
    verify_agent_trust_chain,
    
    # HTTP Signing (Web Bot Auth)
    sign_http_request,
    verify_http_signature,
    generate_web_bot_auth_setup,
    
    # Errors
    ValidationError,
    SignatureError,
    TrustChainError,
)

Development Installation

For contributing or development:

# Clone the repository
git clone https://github.com/belticlabs/fact-python.git
cd fact-python

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Run with coverage
pytest --cov=beltic --cov-report=html

# Type check
mypy src/beltic

# Lint
ruff check src/beltic

Environment Variables

VariableDescriptionDefault
BELTIC_LOG_LEVELLogging verbosity (DEBUG, INFO, WARNING, ERROR)WARNING
BELTIC_CACHE_TTLStatus list cache TTL in seconds300

Next Steps