Get temp mails and verification codes.
Project description
Minutes Mail - Temporary Email Manager
This is a Python library that provides a convenient way to create and manage temporary email addresses using two different services: 1secmail.com and rapidapi.com.
Features
- Create temporary email addresses
- Retrieve a list of available domains for email creation
- Read emails received in the temporary inbox and extract activation codes
- Delete temporary email addresses (only supported for
1secmail)
Installation
- Clone the repository or download the source code.
- Install the required dependencies:
pip install minutes-mail
Usage
- Import the
MinutesMailclass:
from minutes_mail import MinutesMail
- Create an instance of the
MinutesMailclass, specifying theemail_type,rapid_api_key, andproxy_urlas needed:
# With Rapid API Key
mail = MinutesMail.create_instance(
email_type="rapid_api",
rapid_api_key="your_rapid_api_key",
proxy_url="http://your_proxy_url"
)
# Without Rapid API Key (1SecMail)
mail = MinutesMail.create_instance(
email_type="1secmail",
proxy_url="http://your_proxy_url"
)
The create_instance method will automatically create an instance of either RapidMail or OnesecMail based on the provided email_type and whether a rapid_api_key is supplied.
- Use the available methods to manage the temporary email:
# Create a new email address
email = mail.create_mail()
# Get available domains
domains = mail.get_domains()
# Read emails and extract activation code
code = mail.get_activation_code(max_wait_minutes=3)
# Delete the email (only supported for 1SecMail)
mail.delete_email(email=email)
Code Structure
base_class.py: Contains theBaseClass, defining common interfaces and properties for email services.inboxes_mail.py: Implements theOnesecMailclass to interact with the1secmail.comAPI.rapid_mail.py: Implements theRapidMailclass to interact with theprivatix-temp-mail-v1.p.rapidapi.comAPI.mail.py: Provides the factory methodcreate_instanceto create an instance ofRapidMailorOnesecMail.
Dependencies
loguru: For logging.httpx: For making HTTP requests.
Contributing
Contributions are welcome! Please open an issue or submit a pull request if you have any improvements or bug fixes.
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
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 minutes_mail-1.0.3.tar.gz.
File metadata
- Download URL: minutes_mail-1.0.3.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
671219cd2b56017afab77a010aff36a96f15ca6deb949a4395964520d2275c9d
|
|
| MD5 |
927da65b7f6e75ac55aaab539de8fd36
|
|
| BLAKE2b-256 |
5d38a9f919960f4e28f9cdea295937f21223931917845fb30c3d0fe1458159fd
|
File details
Details for the file minutes_mail-1.0.3-py3-none-any.whl.
File metadata
- Download URL: minutes_mail-1.0.3-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e3cc1a09d20395b570fd9bca9249765c0e228affbc124cb8090e6bd4c6764d00
|
|
| MD5 |
f1f692e7af16d2f6e84db8205a510dea
|
|
| BLAKE2b-256 |
439c6a90b9403394ec9fa5eccbe79b83aa7d2eed75ff8eb8cfee73b1cf2b6907
|