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: inboxes.com and privatix-temp-mail-v1.p.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
Installation
- Clone the repository or download the source code.
- Install the required dependencies:
pip install minutes-mail
Usage
- Import the
Mailclass :
from minutes_mail import MinutesMail
- Create an instance of the
Mailclass, specifying therapid_api_keyandproxy_urlif 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
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 InboxesMail based on whether a rapid_api_key is provided or not.
- Use the available methods to manage the temporary email:
# Create a new email
email = MinutesMail.create_mail()
# Get available domains
domains = MinutesMail.get_domains()
# Read emails and get activation code
code = MinutesMail.get_activation_code(max_wait_minutes=3)
# Delete the email ONLY IN INBOXES CURRENT!
MinutesMail.delete_email(email=email)
Code Structure
base_class.py: Contains the base classBaseClassthat defines the common interface and properties for the two email services.inboxes_mail.py: Implements theInboxesMailclass that interacts with theinboxes.comAPI.rapid_mail.py: Implements theRapidMailclass that interacts with theprivatix-temp-mail-v1.p.rapidapi.comAPI.mail.py: Provides a factory methodcreate_instanceto create an instance of eitherRapidMailorInboxesMailbased on the providedrapid_api_key.
Dependencies
loguru: For logging purposes.httpx: For making HTTP requests.bs4(BeautifulSoup): For parsing HTML content (used byInboxesMail).
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.1.tar.gz.
File metadata
- Download URL: minutes_mail-1.0.1.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 |
6f4f4367e2e20ff2900a786e4ee18fb7df15a48082bd9aa2bf18003a3ab4d0c8
|
|
| MD5 |
2c42b1c3c488934aaaacd2f2c815b15b
|
|
| BLAKE2b-256 |
4a17d7f992285baa1b088f7ffe371fc91677feb5a5b46b960408e16ffd47eaad
|
File details
Details for the file minutes_mail-1.0.1-py3-none-any.whl.
File metadata
- Download URL: minutes_mail-1.0.1-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 |
5a7b77443208f6d6d19b26e0b1a104ce50d01d64cfd3a4389ab769ec44f6d0a6
|
|
| MD5 |
a739e7bdb268cb61c0bfa8860e54abd4
|
|
| BLAKE2b-256 |
d0299a19187ffb1f14587bfab59d15e362b969005906c2e733e5ea7989b16f3a
|