Python SDK for DeadDrop — receive-only email inboxes for AI agents
Project description
DeadDrop Python SDK
Python client for the DeadDrop API — programmable email inboxes for the agentic era.
Install
pip install deaddropzone
The distribution name is deaddropzone (the deaddrop name on PyPI is taken), but the import name is still deaddrop:
from deaddrop import DeadDrop
Quick start
from deaddrop import DeadDrop
dd = DeadDrop(api_key="dd_live_...")
# Create an inbox
inbox = dd.create_inbox(slug="my-signup-test")
print(f"Send email to: {inbox.address}")
# Wait for an OTP (blocks until one arrives or timeout)
otp = dd.wait_for_otp(inbox.id, timeout=60)
print(f"Got OTP: {otp.value}")
# Wait for a verification link
link = dd.wait_for_link(inbox.id, "verification", timeout=60)
print(f"Verify at: {link.url}")
Ephemeral inboxes (no auth)
from deaddrop import DeadDrop
dd = DeadDrop() # no API key needed
inbox = dd.create_ephemeral_inbox()
# inbox expires in 1 hour
Configuration
| Parameter | Env var | Default |
|---|---|---|
api_key |
DEADDROP_API_KEY |
— |
base_url |
DEADDROP_API_URL |
https://api.deaddrop.zone |
Convenience methods
The SDK provides high-level methods that compose the long-poll wait endpoint with extraction:
wait_for_message(inbox_id, ...)— Block until a message arrives matching filters.wait_for_otp(inbox_id, ...)— Wait for a message with an OTP, return the highest-confidence match.wait_for_link(inbox_id, link_type, ...)— Wait for a message with a specific link type.
All accept optional timeout, after, subject_contains, and from_contains filters.
Inbox pools
pool = dd.create_pool("ci-tests", target_size=5)
inbox = dd.checkout_inbox(pool.id)
# ... use inbox ...
dd.return_inbox(pool.id, inbox.id)
Error handling
from deaddrop import DeadDrop, DeadDropError
from deaddrop.errors import TimeoutError
dd = DeadDrop(api_key="dd_live_...")
try:
otp = dd.wait_for_otp(inbox_id, timeout=10)
except TimeoutError:
print("No OTP arrived in time")
except DeadDropError as e:
print(f"API error: {e.code} — {e.message}")
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deaddropzone-0.3.0.tar.gz.
File metadata
- Download URL: deaddropzone-0.3.0.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b55443eed650e80906ad0a76ec4f8888ae63f8923f3cdb030374fc0c967e077c
|
|
| MD5 |
0cb8d9b2991d8eaaa25051b7106759db
|
|
| BLAKE2b-256 |
da6f7e0d4a2e14a02e26555db0fd8232debb62a8d1c8c20b420e2d646937d873
|
File details
Details for the file deaddropzone-0.3.0-py3-none-any.whl.
File metadata
- Download URL: deaddropzone-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c478e2986a9286f7a33d14d5d6da7d016df41b0a56cc77a147b608e5c22f61f0
|
|
| MD5 |
64418df401ae9ebf0d52eb7caf687be0
|
|
| BLAKE2b-256 |
380ce64768d3e5e2d20788a070f3e5e3e0d4b3b85f18ced91e7c2069a99ab979
|