Skip to main content

PyTempBox - Python Temporary Email Service

PyPI version Python versions License: MIT

PyTempBox is a lightweight Python library for generating and managing temporary email addresses. Perfect for testing, automation, and protecting your privacy when interacting with online services.

✨ Features

With this service, you can instantly create temporary email addresses 🚀. Once the email address is generated, you can fetch incoming messages in real-time 📩. The service is designed to be lightweight ⚡, requiring minimal dependencies. Additionally, the API follows best practices in Python programming, making it user-friendly 🐍. Security is a top priority, as all connections are made through secure HTTPS 🔒. You can also retrieve the full content of each message received 📝.

📦 Installation

To install the package, simply run the following command in your terminal:

pip install pytempbox

Please note that this package requires Python version 3.9 or higher to work properly.

🚀 Quick Start

from pytempbox import PyTempBox

client = PyTempBox()
email = client.generate_email()
print(f"Temporary email: {email}")

messages = client.get_messages(email)
if messages:
    print(f"Received {len(messages)} message(s)")
    print(f"Latest: {messages[0]['subject']}")
else:
    print("No messages yet")

📚 Documentation

Core Methods

The package offers several useful functions to manage temporary emails. First, you can use generate_email(min_length=10, max_length=15) to create a new temporary email address with a specified minimum and maximum length 🆕✉️. To retrieve messages sent to that email, you can call get_messages(email, timeout=300, interval=10), which checks for incoming messages within a set timeout and interval ⏳📥. If you want to see the full content of a specific message, you can use get_message_content(email, message_id) to get all the details of that message 📜. Lastly, the function get_available_domains() will list all the email domains you can use for generating temporary addresses 🌐.

Advanced Usage

email = client.generate_email(min_length=8, max_length=12)

message = client.get_message_content(
    email="your_temp@example.com",
    message_id="12345"
)

📜 License

This package is distributed under the MIT License, which means you can use, modify, and distribute it freely. For more details about the license, please refer to the LICENSE file. 📄✨

Metadata

Release files for pytempbox 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytempbox 0.1.3
File Size Uploaded
pytempbox-0.1.3.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytempbox 0.1.3
File Interpreter ABI Platform
pytempbox-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / pytempbox-0.1.3.tar.gz

Download URL pytempbox-0.1.3.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fb38a1b4c7fb66442162020f97c9f05c4969d7a07eb0ee75e2a31ea4bc944442
BLAKE2b-256 checksum
How to use checksums
75f7818d43928f0fa20f93ef6c8ec61d0c44cd5107b0a7b2cd06b9f8bdc36ca6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / pytempbox-0.1.3-py3-none-any.whl

Download URL pytempbox-0.1.3-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0e2f5c7ce05df79280cab27c637a56e7249a6540c101dd1e673a97444865c498
BLAKE2b-256 checksum
How to use checksums
470c91061e85a01ebad64f4d03fc78970e29ea69c7111b00fc8e6a71e9e1f698
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page