Skip to main content

Python SDK

Full API reference for zerodrop — the ZeroDrop Python SDK.

Installation

No dependencies. Python 3.8+.

ZeroDrop class

Parameters

Without an API key, ZeroDrop runs in free sandbox mode with a shared domain and 30-minute TTL.

generate_inbox()

Generates a unique inbox address instantly. No network request.

wait_for_latest()

Polls until an email arrives in the inbox. Raises ZeroDropTimeoutError if no email arrives within the timeout.

Parameters


fetch_latest()

Fetches the latest email without waiting. Returns None if the inbox is empty or no email matches the filter.

Email Filtering

Filter emails by sender, subject, body, or extracted fields. Useful when multiple emails land in the same inbox.
All string filters are case-insensitive partial matches.

ZeroDropEmail type

otp

4-8 digit numeric code extracted from the email body. Detected near labels like code, otp, pin, verification. None if not detected.
Verification or reset URL extracted from the email body. Detected for URLs containing verify, confirm, reset, token, activate, or auth. None if not detected.

ZeroDropFilter type


Error types

ZeroDropTimeoutError

Raised when no email arrives within the timeout.

ZeroDropNetworkError

Raised when the API is unreachable. Includes a link to the status page.

ZeroDropAuthError

Raised when an invalid API key is provided.

pytest example


Parallel test runs

generate_inbox() runs locally — no network request, no throttling:

Free vs Workspace

Get a Workspace at zerodrop.dev/pricing

Zero telemetry

The SDK does not send analytics, usage metrics, or environment data to any server. The only network requests made are explicit inbox polls to zerodrop.dev/api/inbox/{name}. Your CI pipeline is your business.