Python Client
The official Python SDK for VaultSandbox Gateway. It handles quantum-safe encryption automatically, letting you focus on testing email workflows.
Key Capabilities
Section titled “Key Capabilities”- Automatic Encryption: ML-KEM-768 key encapsulation + AES-256-GCM encryption handled transparently
- Real-Time Delivery: SSE-based email delivery with smart polling fallback
- Email Authentication: Built-in SPF/DKIM/DMARC validation helpers
- Full Email Access: Decrypted content, headers, links, and attachments
- Type Hints: Full type annotations with
py.typedmarker for IDE support
Requirements
Section titled “Requirements”- Python 3.10+
- VaultSandbox Gateway server
- Valid API key
Gateway Server
Section titled “Gateway Server”The SDK connects to a VaultSandbox Gateway - a receive-only SMTP server you self-host. It handles email reception, authentication validation, and encryption. You can run one with Docker in minutes.
See Gateway Overview or jump to Quick Start to deploy one.
Quick Example
Section titled “Quick Example”import asynciofrom vaultsandbox import VaultSandboxClient
async def main(): async with VaultSandboxClient( base_url="https://gateway.example.com", api_key="your-api-key", ) as client: # Create inbox (keypair generated automatically) inbox = await client.create_inbox()
# Send email to inbox.email_address from your application...
# Wait for email email = await inbox.wait_for_email()
print(f"Subject: {email.subject}") print(f"Text: {email.text}")
# Cleanup await inbox.delete()
asyncio.run(main())Next Steps
Section titled “Next Steps”- Installation - Install the SDK
- Configuration - Client options and setup
- Core Concepts - Inboxes, emails, and authentication
- API Reference - Full API documentation