Python client for Boomlify temporary email API
Project description
Boomlify - Best Temporary Email API for Python | Disposable Email Service
temp mail is the world's most advanced temporary email service and disposable email API. This Python client library provides seamless integration with the Boomlify temporary email API, making it easy to create, manage, and monitor temporary emails for testing, automation, and development purposes.
๐ Why Choose Boomlify Temporary Email Service?
Boomlify stands out as the premier temporary email solution with:
- ๐ฅ Long-lasting emails - Unlike other temp mail services, Boomlify emails last up to 24 hours
- โก Lightning-fast API - Industry-leading response times for temporary email operations
- ๐ Custom domains - Use your own domains with our temporary email service
- ๐ก๏ธ Enterprise security - Advanced protection for your temporary email needs
- ๐ Analytics dashboard - Comprehensive insights into your temporary email usage
- ๐ Auto-rotation - Intelligent load balancing across multiple servers
Visit Boomlify.com to get started with the best temporary email service available.
๐ฏ Temporary Email API Features
Our comprehensive temporary email Python library offers:
- ๐ Easy integration: Simple and intuitive disposable email API
- ๐ง Complete temp mail management: Create, list, read, and delete temporary emails
- โฐ Flexible expiration: 10 minutes, 1 hour, or 1 day temporary email lifespans
- ๐ท๏ธ Custom domain support: Use your own verified domains for temp emails
- ๐ High availability: Automatic base URL rotation for reliable temporary email service
- ๐ก๏ธ Enterprise reliability: Comprehensive error handling with custom exceptions
- ๐ Auto-retry: Built-in retry mechanism for failed temporary email requests
- ๐ Usage analytics: Monitor your temporary email account usage and limits
- ๐ Real-time monitoring: Wait for new emails with intelligent polling support
- ๐ Global infrastructure: Worldwide temporary email servers for optimal performance
๐ฆ Installation - Get Started with Boomlify Temporary Email
Install the best temporary email Python package using pip:
pip install boomlify
Get your FREE API key at Boomlify.com to start using our temporary email service.
๐ Quick Start - Create Your First Temporary Email
Start using Boomlify's temporary email API in just a few lines of code:
from boomlify import BoomlifyClient
# Initialize the client
client = BoomlifyClient(api_key="your_api_key_here")
# Create a temporary email
email = client.create_email(time_option="10min")
print(f"Created email: {email.address}")
print(f"Email ID: {email.id}")
print(f"Expires at: {email.expires_at}")
# List your emails
emails = client.list_emails()
print(f"You have {emails.total_count} emails")
for email in emails.emails:
print(f"- {email.address} (ID: {email.id})")
# Get messages for an email
messages = client.get_messages(email.id)
print(f"Found {len(messages.messages)} messages")
for message in messages.messages:
print(f"From: {message.from_address}")
print(f"Subject: {message.subject}")
print(f"Body: {message.body}")
# Wait for new emails (polling)
print("Waiting for new emails...")
new_message = client.wait_for_mail(email.id, timeout_seconds=60)
if new_message:
print(f"New message: {new_message.subject}")
else:
print("No new messages received")
# Get account information
account = client.get_account()
print(f"Plan: {account.plan}")
print(f"Daily limit: {account.daily_limit}")
print(f"Remaining emails: {account.remaining_emails}")
# Delete an email
client.delete_email(email.id)
print("Email deleted")
API Reference
BoomlifyClient
The main client class for interacting with the Boomlify API.
Constructor
BoomlifyClient(api_key, base_url=None, timeout=30, max_retries=3)
api_key(str): Your Boomlify API keybase_url(str, optional): API base URL (auto-fetched if not provided)timeout(int): Request timeout in seconds (default: 30)max_retries(int): Maximum retries for failed requests (default: 3)
Methods
create_email(time_option="10min", custom_domain=None)
Create a new temporary email address.
email = client.create_email(time_option="1hour", custom_domain="yourdomain.com")
Parameters:
time_option(str): Email lifespan - "10min", "1hour", or "1day"custom_domain(str, optional): Custom domain (must be verified)
Returns: Email object
list_emails(include_expired=False, limit=10)
List your temporary emails.
emails = client.list_emails(include_expired=True, limit=20)
Parameters:
include_expired(bool): Include expired emails (default: False)limit(int): Maximum number of emails to return (default: 10)
Returns: EmailList object
get_email(email_id)
Get details of a specific email.
email = client.get_email("email_id_here")
Parameters:
email_id(str): The email ID
Returns: Email object
get_messages(email_id, limit=10, offset=0)
Get messages for a specific email.
messages = client.get_messages("email_id_here", limit=5, offset=0)
Parameters:
email_id(str): The email IDlimit(int): Maximum number of messages to return (default: 10)offset(int): Number of messages to skip (default: 0)
Returns: MessageList object
delete_email(email_id)
Delete a temporary email.
success = client.delete_email("email_id_here")
Parameters:
email_id(str): The email ID to delete
Returns: bool - True if deletion was successful
get_usage()
Get usage statistics for your account.
usage = client.get_usage()
print(f"Total emails created: {usage.total_emails_created}")
print(f"Messages today: {usage.messages_today}")
Returns: UsageInfo object
get_account()
Get account information.
account = client.get_account()
print(f"Plan: {account.plan}")
print(f"Daily limit: {account.daily_limit}")
Returns: AccountInfo object
wait_for_mail(email_id, timeout_seconds=300, check_interval=5)
Wait for new emails to arrive.
message = client.wait_for_mail("email_id_here", timeout_seconds=60, check_interval=3)
if message:
print(f"New message: {message.subject}")
Parameters:
email_id(str): The email ID to monitortimeout_seconds(int): Maximum time to wait in seconds (default: 300)check_interval(int): How often to check for new messages in seconds (default: 5)
Returns: EmailMessage if new message arrives, None if timeout
get_base_url()
Get the current API base URL.
base_url = client.get_base_url()
Returns: str - The current API base URL
refresh_base_url()
Force refresh of the base URL.
new_base_url = client.refresh_base_url()
Returns: str - The new base URL
Data Models
Represents a temporary email address.
@dataclass
class Email:
id: str
address: str
domain: str
time_tier: str
expires_at: str
is_expired: bool
message_count: int
time_remaining_minutes: int
EmailMessage
Represents an email message.
@dataclass
class EmailMessage:
id: str
subject: str
body: str
from_address: str
to_address: str
received_at: str
attachments: List[Dict[str, Any]]
headers: Dict[str, str]
EmailList
Represents a list of emails with metadata.
@dataclass
class EmailList:
emails: List[Email]
total_count: int
success: bool
message: str
MessageList
Represents a list of messages with metadata.
@dataclass
class MessageList:
messages: List[EmailMessage]
total_messages: int
first_message_subject: Optional[str]
first_message_body: Optional[str]
first_message_from: Optional[str]
success: bool
message: str
Error Handling
The client provides comprehensive error handling with custom exceptions:
from boomlify import BoomlifyClient, BoomlifyError, BoomlifyAuthError, BoomlifyRateLimitError
client = BoomlifyClient(api_key="your_api_key")
try:
email = client.create_email()
except BoomlifyAuthError as e:
print(f"Authentication error: {e}")
except BoomlifyRateLimitError as e:
print(f"Rate limit exceeded. Retry after {e.retry_after} seconds")
except BoomlifyError as e:
print(f"General error: {e}")
Exception Types
BoomlifyError: Base exception for all errorsBoomlifyAPIError: API returned an error responseBoomlifyAuthError: Authentication errors (401, 403)BoomlifyNotFoundError: Resource not found (404)BoomlifyRateLimitError: Rate limit exceeded (429)BoomlifyTimeoutError: Request timeoutBoomlifyValidationError: Client-side validation errors
Context Manager Support
The client supports context manager usage for automatic resource cleanup:
with BoomlifyClient(api_key="your_api_key") as client:
email = client.create_email()
messages = client.get_messages(email.id)
# Session is automatically closed when exiting the context
Advanced Usage
Custom Domains
If you have verified custom domains in your Boomlify account:
# Create email with custom domain
email = client.create_email(time_option="1hour", custom_domain="yourdomain.com")
print(f"Created email: {email.address}") # user@yourdomain.com
Batch Operations
# Create multiple emails
emails = []
for i in range(3):
email = client.create_email(time_option="10min")
emails.append(email)
print(f"Created: {email.address}")
# Monitor all emails for messages
for email in emails:
messages = client.get_messages(email.id)
if messages.messages:
print(f"Email {email.address} has {len(messages.messages)} messages")
Polling for Messages
import time
def monitor_email(client, email_id, duration=300):
"""Monitor an email for new messages."""
end_time = time.time() + duration
while time.time() < end_time:
messages = client.get_messages(email_id)
if messages.messages:
for message in messages.messages:
print(f"New message from {message.from_address}: {message.subject}")
time.sleep(10) # Check every 10 seconds
# Usage
email = client.create_email()
monitor_email(client, email.id, duration=120)
Rate Limiting
The client automatically handles rate limiting with exponential backoff. When you hit rate limits, the client will:
- Catch the
BoomlifyRateLimitError - Automatically retry after the specified delay
- Use exponential backoff for subsequent retries
๐ฏ Temporary Email Use Cases
Boomlify's temporary email service is perfect for:
๐งช Testing & QA
- Email verification testing - Test signup flows with disposable emails
- API testing - Validate email notifications in your applications
- Automation testing - Create temporary emails for test scenarios
- Load testing - Generate multiple temporary emails for performance testing
๐ Privacy & Security
- Anonymous registrations - Sign up for services without revealing your real email
- Temporary communications - Receive emails without spam concerns
- Data protection - Keep your personal email address private
- GDPR compliance - Use temporary emails for data processing
๐ ๏ธ Development & Integration
- API integrations - Test email functionality during development
- Webhook testing - Receive email notifications for webhook testing
- Demo accounts - Create temporary accounts for demonstrations
- Beta testing - Provide temporary emails for beta user testing
๐ข Business Applications
- Customer onboarding - Streamline registration processes
- Email marketing - Test email campaigns before sending
- Customer support - Create temporary channels for support tickets
- Lead generation - Capture leads without permanent email commitments
๐ Why Developers Choose Boomlify
๐ Performance Leader
Boomlify offers the fastest temporary email API in the industry with:
- Sub-second response times for email creation
- 99.9% uptime guarantee with global infrastructure
- Auto-scaling to handle millions of temporary emails
- CDN integration for worldwide performance optimization
๐ก๏ธ Enterprise Security
- SOC 2 compliance for enterprise-grade security
- End-to-end encryption for all temporary emails
- GDPR & CCPA compliant data handling
- Zero data retention after email expiration
๐ก Developer Experience
- Comprehensive Python SDK with full documentation
- RESTful API with intuitive endpoints
- Webhook support for real-time notifications
- 24/7 developer support via Boomlify.com
๐ Boomlify vs Competitors
| Feature | Boomlify | TempMail | Mailinator | 10MinuteMail |
|---|---|---|---|---|
| Max Email Duration | 24 hours | 10 minutes | 6 hours | 10 minutes |
| Custom Domains | โ Yes | โ No | โ Limited | โ No |
| API Rate Limits | 1000/min | 100/min | 50/min | 20/min |
| Python SDK | โ Full | โ No | โ Basic | โ No |
| Webhook Support | โ Yes | โ No | โ No | โ No |
| Enterprise Support | โ 24/7 | โ No | โ Business | โ No |
Start with Boomlify today and experience the difference!
๐ Getting Started with Boomlify
- Sign up at Boomlify.com for your free account
- Get your API key from the dashboard
- Install the Python package:
pip install boomlify - Start creating temporary emails in minutes!
๐ Useful Links
- ๐ Official Website: Boomlify.com
- ๐ API Documentation: Boomlify.com/docs
- ๐ฎ Interactive Demo: Boomlify.com/demo
- ๐ฌ Community Support: Boomlify.com/community
- ๐ง Email Support: support@boomlify.com
- ๐ Bug Reports: GitHub Issues
Contributing
We welcome contributions! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Boomlify - The Ultimate Temporary Email Solution
Create temporary emails instantly | Disposable email API | Temp mail service | Email testing tools
ยฉ 2024 Boomlify. All rights reserved. | Privacy Policy | Terms of Service
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 boomlify-1.0.0.tar.gz.
File metadata
- Download URL: boomlify-1.0.0.tar.gz
- Upload date:
- Size: 20.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddbddf30794c93748121363597ee6d26517c0d35a6ad3ec6597d16f1dc5825dc
|
|
| MD5 |
1142362c849448cde5511df600cef619
|
|
| BLAKE2b-256 |
db24601a17037c45f60205098ab407a9ac3e694201eed423bd23d4fd5b33944b
|
File details
Details for the file boomlify-1.0.0-py3-none-any.whl.
File metadata
- Download URL: boomlify-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bbd6533ae5e0be3ecf124e7fcf091ac2b30a33fbb7b259843860c9541f8b54c
|
|
| MD5 |
23662aa87f898506e68a00823bdf1c2d
|
|
| BLAKE2b-256 |
4f73701ef2d43c0111b701cbdc914052c72cc336bc13f0695571eec0649fbe09
|