Name | temmail JSON |
Version |
2.1.0
JSON |
| download |
home_page | None |
Summary | Professional temporary email service wrapper with a comprehensive CLI tool. |
upload_time | 2025-10-06 13:17:53 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
email
temporary
tempmail
api
cli
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# TemMail
[](https://badge.fury.io/py/temmail)
[](https://pypi.org/project/temmail/)
[](https://opensource.org/licenses/MIT)
[](https://github.com/psf/bl)
**TemMail** is a professional Python wrapper for the `temp-mail.io` API, providing advanced temporary email functionality with a comprehensive CLI tool.
## Features
- 🚀 **Easy to Use**: Simple API for creating and managing temporary email accounts.
- 📧 **Message Management**: Full message handling with read/unread status.
- 🔍 **Search & Filter**: Advanced search capabilities across messages.
- 💾 **Export Options**: Export messages in JSON, TXT, or EML formats.
- 🖥️ **CLI Tool**: Full-featured command-line interface.
- 🔄 **Auto-monitoring**: Monitor accounts for new messages with callbacks.
- 🛡️ **Error Handling**: Comprehensive error handling with retry logic.
- 📊 **Statistics**: Get detailed account and message statistics.
- ⚙️ **Configurable**: Extensive configuration options.
- 🎯 **Type Hints**: Full type annotation support.
## Installation
You can install TemMail using `pip`:
```bash
pip install temmail
```
For development, you can install the extra dependencies:
```bash
pip install temmail[dev]
```
### Package Structure
The project is organized like this:
```
temmail/
├── temmail/
│ ├── __init__.py
│ ├── cli.py
│ ├── core.py
│ ├── exceptions.py
│ ├── config.py
│ ├── models.py
│ └── utils.py
├── tests/
│ ├── __init__.py
│ ├── test_core.py
│ ├── test_cli.py
│ └── test_config.py
├── docs/
│ ├── README.md
│ ├── CHANGELOG.md
│ └── LICENSE
├── pyproject.toml
├── setup.cfg
├── setup.py
├── MANIFEST.in
└── .gitignore
```
## Usage
TemMail offers both a powerful Python API and a comprehensive Command-Line Interface (CLI) to manage temporary email accounts.
### Python API Examples
Here are some examples of how to use the Python API:
```python
from temmail import get_temp_email, wait_for_message, TemMailAccount
# 1. Create a temporary email account
account: TemMailAccount = get_temp_email()
print(f"Your temporary email: {account.email}")
# 2. Get and manage messages
messages = account.get_messages()
print(f"Received {len(messages)} messages")
if messages:
# Mark the first message as read
messages[0].mark_as_read()
print(f"Marked message '{messages[0].subject}' as read.")
# 3. Wait for a specific message
def is_verification(msg):
return "verify" in msg.subject.lower()
print("Waiting for a verification email...")
message = wait_for_message(account, timeout=60, filter_func=is_verification)
if message:
print(f"Got verification email: {message.subject}")
else:
print("No verification email received within the timeout.")
# 4. Search messages
search_results = account.search_messages(query="important", field="subject")
print(f"Found {len(search_results)} messages with 'important' in subject.")
# 5. Get account statistics
stats = account.get_stats()
print(f"Account statistics: Total messages: {stats.total_messages}, Unread: {stats.unread_messages}")
# 6. Delete the account (use with caution!)
# account.delete()
# print(f"Account {account.email} deleted.")
```
### Command-Line Interface (CLI) Examples
TemMail also comes with a powerful CLI. Here are some examples:
```bash
# 1. Create a new temporary email account
temmail create
# 2. Monitor for new messages and open the first one automatically
temmail monitor --stop-first --auto-open
# 3. List all unread messages
temmail messages --unread
# 4. Search messages by subject containing "password"
temmail search "password" --field subject
# 5. Export all messages to a JSON file
temmail export -o messages.json --format json
# 6. Get information about the current account
temmail info
# 7. Delete the current temporary email account (use with caution!)
# temmail delete --yes
```
## Documentation
For more detailed information, please refer to the [official documentation](./index.md).
## Contributing
Contributions are welcome! If you'd like to contribute to the project, please follow these steps:
1. Fork the repository on GitHub.
2. Create a new branch with a descriptive name.
3. Make your changes and commit them with a clear message.
4. Push your changes to your fork.
5. Create a pull request to the main repository.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.ile for details.
### Documentation
Full documentation is available at https://temmail.readthedocs.io
Raw data
{
"_id": null,
"home_page": null,
"name": "temmail",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "KaiSoKei <kaisokei.email@gmail.com>",
"keywords": "email, temporary, tempmail, api, cli",
"author": null,
"author_email": "KaiSoKei <kaisokei.email@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f4/a4/17dd5fe7abe2493b1cef583978f132ceb31c7a645db7ceb46a829156bc29/temmail-2.1.0.tar.gz",
"platform": null,
"description": "# TemMail\r\n\r\n[](https://badge.fury.io/py/temmail)\r\n[](https://pypi.org/project/temmail/)\r\n[](https://opensource.org/licenses/MIT)\r\n[](https://github.com/psf/bl)\r\n\r\n\r\n**TemMail** is a professional Python wrapper for the `temp-mail.io` API, providing advanced temporary email functionality with a comprehensive CLI tool.\r\n\r\n## Features\r\n\r\n- \ud83d\ude80 **Easy to Use**: Simple API for creating and managing temporary email accounts.\r\n- \ud83d\udce7 **Message Management**: Full message handling with read/unread status.\r\n- \ud83d\udd0d **Search & Filter**: Advanced search capabilities across messages.\r\n- \ud83d\udcbe **Export Options**: Export messages in JSON, TXT, or EML formats.\r\n- \ud83d\udda5\ufe0f **CLI Tool**: Full-featured command-line interface.\r\n- \ud83d\udd04 **Auto-monitoring**: Monitor accounts for new messages with callbacks.\r\n- \ud83d\udee1\ufe0f **Error Handling**: Comprehensive error handling with retry logic.\r\n- \ud83d\udcca **Statistics**: Get detailed account and message statistics.\r\n- \u2699\ufe0f **Configurable**: Extensive configuration options.\r\n- \ud83c\udfaf **Type Hints**: Full type annotation support.\r\n\r\n## Installation\r\n\r\nYou can install TemMail using `pip`:\r\n\r\n```bash\r\npip install temmail\r\n```\r\n\r\nFor development, you can install the extra dependencies:\r\n\r\n```bash\r\npip install temmail[dev]\r\n```\r\n\r\n### Package Structure\r\nThe project is organized like this:\r\n```\r\ntemmail/\r\n\u251c\u2500\u2500 temmail/\r\n\u2502 \u251c\u2500\u2500 __init__.py\r\n\u2502 \u251c\u2500\u2500 cli.py\r\n\u2502 \u251c\u2500\u2500 core.py\r\n\u2502 \u251c\u2500\u2500 exceptions.py\r\n\u2502 \u251c\u2500\u2500 config.py\r\n\u2502 \u251c\u2500\u2500 models.py\r\n\u2502 \u2514\u2500\u2500 utils.py\r\n\u251c\u2500\u2500 tests/\r\n\u2502 \u251c\u2500\u2500 __init__.py\r\n\u2502 \u251c\u2500\u2500 test_core.py\r\n\u2502 \u251c\u2500\u2500 test_cli.py\r\n\u2502 \u2514\u2500\u2500 test_config.py\r\n\u251c\u2500\u2500 docs/\r\n\u2502 \u251c\u2500\u2500 README.md\r\n\u2502 \u251c\u2500\u2500 CHANGELOG.md\r\n\u2502 \u2514\u2500\u2500 LICENSE\r\n\u251c\u2500\u2500 pyproject.toml\r\n\u251c\u2500\u2500 setup.cfg\r\n\u251c\u2500\u2500 setup.py\r\n\u251c\u2500\u2500 MANIFEST.in\r\n\u2514\u2500\u2500 .gitignore\r\n```\r\n\r\n## Usage\r\n\r\nTemMail offers both a powerful Python API and a comprehensive Command-Line Interface (CLI) to manage temporary email accounts.\r\n\r\n### Python API Examples\r\n\r\nHere are some examples of how to use the Python API:\r\n\r\n```python\r\nfrom temmail import get_temp_email, wait_for_message, TemMailAccount\r\n\r\n# 1. Create a temporary email account\r\naccount: TemMailAccount = get_temp_email()\r\nprint(f\"Your temporary email: {account.email}\")\r\n\r\n# 2. Get and manage messages\r\nmessages = account.get_messages()\r\nprint(f\"Received {len(messages)} messages\")\r\n\r\nif messages:\r\n # Mark the first message as read\r\n messages[0].mark_as_read()\r\n print(f\"Marked message '{messages[0].subject}' as read.\")\r\n\r\n# 3. Wait for a specific message\r\ndef is_verification(msg):\r\n return \"verify\" in msg.subject.lower()\r\n\r\nprint(\"Waiting for a verification email...\")\r\nmessage = wait_for_message(account, timeout=60, filter_func=is_verification)\r\nif message:\r\n print(f\"Got verification email: {message.subject}\")\r\nelse:\r\n print(\"No verification email received within the timeout.\")\r\n\r\n# 4. Search messages\r\nsearch_results = account.search_messages(query=\"important\", field=\"subject\")\r\nprint(f\"Found {len(search_results)} messages with 'important' in subject.\")\r\n\r\n# 5. Get account statistics\r\nstats = account.get_stats()\r\nprint(f\"Account statistics: Total messages: {stats.total_messages}, Unread: {stats.unread_messages}\")\r\n\r\n# 6. Delete the account (use with caution!)\r\n# account.delete()\r\n# print(f\"Account {account.email} deleted.\")\r\n```\r\n\r\n### Command-Line Interface (CLI) Examples\r\n\r\nTemMail also comes with a powerful CLI. Here are some examples:\r\n\r\n```bash\r\n# 1. Create a new temporary email account\r\ntemmail create\r\n\r\n# 2. Monitor for new messages and open the first one automatically\r\ntemmail monitor --stop-first --auto-open\r\n\r\n# 3. List all unread messages\r\ntemmail messages --unread\r\n\r\n# 4. Search messages by subject containing \"password\"\r\ntemmail search \"password\" --field subject\r\n\r\n# 5. Export all messages to a JSON file\r\ntemmail export -o messages.json --format json\r\n\r\n# 6. Get information about the current account\r\ntemmail info\r\n\r\n# 7. Delete the current temporary email account (use with caution!)\r\n# temmail delete --yes\r\n```\r\n\r\n## Documentation\r\n\r\nFor more detailed information, please refer to the [official documentation](./index.md).\r\n\r\n## Contributing\r\n\r\nContributions are welcome! If you'd like to contribute to the project, please follow these steps:\r\n\r\n1. Fork the repository on GitHub.\r\n2. Create a new branch with a descriptive name.\r\n3. Make your changes and commit them with a clear message.\r\n4. Push your changes to your fork.\r\n5. Create a pull request to the main repository.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.ile for details.\r\n\r\n\r\n### Documentation\r\nFull documentation is available at https://temmail.readthedocs.io\r\n",
"bugtrack_url": null,
"license": null,
"summary": "Professional temporary email service wrapper with a comprehensive CLI tool.",
"version": "2.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/KaiSoKei/temmail/issues",
"Changelog": "https://github.com/KaiSoKei/temmail/blob/main/CHANGELOG.md",
"Documentation": "https://github.com/KaiSoKei/temmail#readme",
"Homepage": "https://github.com/KaiSoKei/temmail",
"Repository": "https://github.com/KaiSoKei/temmail"
},
"split_keywords": [
"email",
" temporary",
" tempmail",
" api",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "c9ac89c12deaf3cff1e475ef50dd02429b5558adae8442e5bd29316c8271cb5a",
"md5": "3e7bcd0b9b7e773bf097bf172a24c81f",
"sha256": "a0c86084c4b49bbe710c50c420f744ed4b2902ae2adec448eac2284a1331cc19"
},
"downloads": -1,
"filename": "temmail-2.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3e7bcd0b9b7e773bf097bf172a24c81f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 22902,
"upload_time": "2025-10-06T13:17:51",
"upload_time_iso_8601": "2025-10-06T13:17:51.179368Z",
"url": "https://files.pythonhosted.org/packages/c9/ac/89c12deaf3cff1e475ef50dd02429b5558adae8442e5bd29316c8271cb5a/temmail-2.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f4a417dd5fe7abe2493b1cef583978f132ceb31c7a645db7ceb46a829156bc29",
"md5": "02aadfd298320c44cfa4e196f7d07612",
"sha256": "82542974a96a56773951b6479076e90d99d495ae471c3968879aa5b3b6bcbeac"
},
"downloads": -1,
"filename": "temmail-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "02aadfd298320c44cfa4e196f7d07612",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 24873,
"upload_time": "2025-10-06T13:17:53",
"upload_time_iso_8601": "2025-10-06T13:17:53.823238Z",
"url": "https://files.pythonhosted.org/packages/f4/a4/17dd5fe7abe2493b1cef583978f132ceb31c7a645db7ceb46a829156bc29/temmail-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-06 13:17:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "KaiSoKei",
"github_project": "temmail",
"github_not_found": true,
"lcname": "temmail"
}