Skip to main content

Python library for temporary email addresses

Project description

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. 📄✨

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytempbox-0.1.3.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytempbox-0.1.3-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file pytempbox-0.1.3.tar.gz.

File metadata

  • Download URL: pytempbox-0.1.3.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pytempbox-0.1.3.tar.gz
Algorithm Hash digest
SHA256 fb38a1b4c7fb66442162020f97c9f05c4969d7a07eb0ee75e2a31ea4bc944442
MD5 11b6f7194013eb48aa35a368e6d08ee1
BLAKE2b-256 75f7818d43928f0fa20f93ef6c8ec61d0c44cd5107b0a7b2cd06b9f8bdc36ca6

See more details on using hashes here.

File details

Details for the file pytempbox-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: pytempbox-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for pytempbox-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0e2f5c7ce05df79280cab27c637a56e7249a6540c101dd1e673a97444865c498
MD5 45c41809b726dc927d1743e02f8c6fb4
BLAKE2b-256 470c91061e85a01ebad64f4d03fc78970e29ea69c7111b00fc8e6a71e9e1f698

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page