ZeroBounce Python SDK

Official Python client for the ZeroBounce email validation and verification API

SDK
PyPI
v2.2.4
3stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
49/100Fair
Development Activity72
Maintenance48
Community16
Maturity60
Momentum0

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
72/100Good
Architecture72
Code Quality74
Innovation55
Learning Curve88

The ZeroBounce Python SDK is the official client library for the ZeroBounce email validation API. It wraps the REST endpoints in typed Python methods so you can verify email addresses, run bulk file validations, and pull account and activity data without writing raw HTTP calls.

It exposes a single ZeroBounce entry point plus response and exception types, supports multiple API regions (USA, EU, or a custom base URL), and handles both single and batch validation workflows.

What You Get

  • A single ZeroBounce client initialized with an API key and optional region
  • Single and batch email validation methods with typed response objects
  • Bulk file send/status/download workflows for large lists
  • Account and usage helpers such as get_credits and get_api_usage
  • Region selection (USA, EU, default) or a custom base URL

Common Use Cases

  • Validating email addresses at signup to reduce bounces
  • Cleaning existing mailing lists in bulk via file uploads
  • Monitoring API credit balance and usage from application code
  • Enriching leads with email-format discovery and activity insights

Under The Hood

Architecture - The package (src/zerobouncesdk/) is organized around a ZeroBounce client class that composes request URLs from a configurable base URL (zb_api_url.py) and maps each API endpoint to a method. Each endpoint has a dedicated response dataclass (e.g. zb_validate_response.py, zb_get_credits_response.py, zb_send_file_response.py) that parses the JSON payload, and a shared _zb_response.py base plus zb_exceptions.py for uniform error handling.

Tech Stack - Pure Python packaged with setuptools (setup.py / pyproject.toml), depending only on requests for HTTP. A Dockerfile is provided for reproducible test runs.

Code Quality - The code is small and consistent, with one class per file, clear zb_-prefixed naming, and explicit response models rather than raw dicts. A tests/ directory accompanies the source, and errors are surfaced through a single ZBException type.

API Design - The public API is deliberately minimal and discoverable: construct one client, call intent-named methods, and read typed responses. Region handling via the ZBApiUrl enum and a custom-URL escape hatch keeps configuration simple, and only a few lines are needed to get started.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search