Asynchronous Python library for working with temporary email services
Project description
async-temp-email
Overview
async-temp-email is an asynchronous Python library for working with temporary email services. It allows you to easily generate disposable email addresses, fetch messages, and poll for incoming emails in real-time.
This library supports a modular design, enabling integration with multiple temporary email providers. Currently supported provider:
Emailnator
Features
- Asynchronous API for generating temporary email addresses
- Fetch messages for a given mailbox
- Retrieve individual message content
- Real-time polling of incoming emails
- Easy integration with multiple providers via a registry-based client system
Installation
pip install async-temp-email
Usage
Create a client
from async_temp_email import TempEmailClient
# Initialize a provider client
client = TempEmailClient.create("emailnator", timeout=30, retries=3)
async with TempEmailClient.create("emailnator", timeout=30, retries=3) as client: # Recommended
...
Generate a temporary email
from pydantic import EmailStr
email: EmailStr = await client.service.get_email()
print(email)
Fetch messages
messages = await client.service.get_messages(email)
for msg in messages:
print(msg.message_subject, msg.message_content)
Poll for new messages
async with client.polling(email=email, poll_interval=5, skip_existing=False) as poller:
async for message in poller:
print(message.message_subject, message.message_content)
License
Code and documentation copyright 2025-2026. Code released under the MIT License.
Contributing
Contributions, issues, and feature requests are welcome! Feel free to fork the repository and submit a pull request.
Links
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 async_temp_email-0.1.0.tar.gz.
File metadata
- Download URL: async_temp_email-0.1.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72e0ef9ee325bc71c42ee470ed12b7793de7d14815d4cffe61e88f08b97f753f
|
|
| MD5 |
598197f694b11dde1f6379761bcc86e1
|
|
| BLAKE2b-256 |
3e960b45d285e940b072d4ea7fdf86ca621023f3777437c40c9f05be9eeca226
|
File details
Details for the file async_temp_email-0.1.0-py3-none-any.whl.
File metadata
- Download URL: async_temp_email-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11a8643cc0678dcb31d66a6ee16f5d32e6985a19f3e9264f1a5e75c67f432a06
|
|
| MD5 |
31e4c2dc53c2d25da09672b096c58498
|
|
| BLAKE2b-256 |
7fbab62b0a205f64e8836ad3c70409c68c6f33d8cf5001df1cbf89bd5d92cac1
|