imap-tools
Work with email by IMAP
Decision gist · record as of 2026-08-14
Yes. imap_tools is actively maintained, has no external dependencies, supports modern Python versions, carries no known vulnerabilities, and uses a permissive license. Install it if you need to automate IMAP email tasks in Python—it significantly simplifies the standard library's imaplib. The only caveat is that it is not thread-safe, so use separate instances per thread if needed.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a working IMAP server and valid credentials; not thread-safe.
- Low friction: pure Python wheel with no runtime dependencies.
- Actively maintained—last release 8 days ago, 837 repository stars, supports Python 3.8 through 3.14.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2026-08-06 (8 days) · last repo commit 2026-08-06 · 837 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 752,551 downloads/mo, #5,152 on PyPI
Alternatives
Verify before relying
from imap_tools import MailBox, AND
with MailBox('imap.mail.com').login('user@mail.com', 'password') as mailbox:
for msg in mailbox.fetch(AND(subject='weather')):
print(msg.subject, msg.date, msg.text)- Performance characteristics when handling large mailboxes or bulk operations.
- Compatibility with less common IMAP server implementations or extensions.
What it is and what it does
imap_tools is a Python library that wraps the standard library's imaplib to provide a simpler, higher-level interface for working with email via IMAP. It handles the low-level protocol details and lets you fetch messages, search by criteria, manage folders, and perform actions like copy, move, delete, and flag—all without needing external dependencies beyond Python itself.
The library parses email messages into structured objects with attributes like subject, sender, recipients, body (text and HTML variants), attachments, and headers. It includes a query builder for constructing search criteria, support for IDLE (server push notifications), and context managers for safe connection handling. It's designed for straightforward email automation tasks: monitoring inboxes, archiving, filtering, or bulk operations on messages and folders.
Use it for
- Automated email monitoring: poll an inbox for new messages matching specific criteria and trigger actions.
- Email backup or archival: fetch and download messages from IMAP folders in bulk.
- Message filtering and organization: search emails by subject, sender, or date and move or flag them.
- Notification systems: use IDLE to wait for new mail server-side and react in real time.
- Email data extraction: parse message headers, bodies, and attachments for analysis or logging.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
imap_tools is actively maintained, has no external dependencies, supports modern Python versions, carries no known vulnerabilities, and uses a permissive license. Install it if you need to automate IMAP email tasks in Python—it significantly simplifies the standard library's imaplib. The only caveat is that it is not thread-safe, so use separate instances per thread if needed.
Install
imap-tools on PyPI
Before you install
Low friction: pure Python wheel with no runtime dependencies. Actively maintained—last release 8 days ago, 837 repository stars, supports Python 3.8 through 3.14.
Requires a working IMAP server and valid credentials; not thread-safe.
License in practice
Apache-2.0 is permissive; you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
from imap_tools import MailBox, AND
with MailBox('imap.mail.com').login('user@mail.com', 'password') as mailbox:
for msg in mailbox.fetch(AND(subject='weather')):
print(msg.subject, msg.date, msg.text)
Verify before relying
- Performance characteristics when handling large mailboxes or bulk operations.
- Compatibility with less common IMAP server implementations or extensions.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 752,551 / month, #5,152 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: imap_tools-1.15.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “fetch emails python”
- imap-toolsA high-level Python library for IMAP email operations: fetch, search,…
- emailsBuild and send HTML and plain-text emails with attachments, inline…
- brevo-pythonOfficial Python SDK for the Brevo API, providing typed client access…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also IMAPClient · aioimaplib · robotframework-imaplibrary2 · pymisp · mailsuite · mailslurp-client · apache-airflow-providers-imap · mailosaur · mailbits · email-reply-parser